Analysis for the manuscript

This document records the analysis and production of figures and tables for the manuscript:

“Understanding and improving biosecurity among recreational anglers: overcoming barriers and communicating with stakeholders in Great Britain.”.

Emily R.C. Smith (Orcid: 0000-0003-2767-9933)superscript^1, Richard Heal (0000-0002-0647-0869)superscript^2, Louisa E Wood (0000-0002-8649-5010)superscript^3

1Angling Trust, The Old Police Station, Wharncliffe Rd, Ilkeston, DE7 5GF, UK superscript^2Centre for Environment Fisheries and Aquaculture Science, Weymouth, Dorset, DT4 8UB, UK superscript^3Centre for Blue Governance, Faculty of Economics and Law, University of Portsmouth, Portsmouth, PO1 3DE, UK

Analysis was performed on results from an angling survey performed in 2018 by the Environment Agency.

The content of this markdown should not be reproduced without the prior knowledge of the authors.

The data has been cleaned by the process outlined in the document DataCleaningProcess.doc which can be found in the repository along with the code that performed data cleaning.

Results Section 1: Demographics of study group compared to the British freshwater angling community (based on rod licences)

#################################################################################
# In this section the survey group is compared to the details of rod licence holders
# Note that the survey includes anglers from Wales and Scotland - not so for rod licences
##########################################################################################
##############################
#### Comparison by gender ####
##############################
RodGenderDatafilename <- "RodLicenceNumbersBySex.csv"
RODGENDERAnglingData <- read.csv(RodGenderDatafilename, header = TRUE)

GenderComparisonDF <- cbind(RODGENDERAnglingData,
                            Survey = c(AnglingData[Sex == "Female", .N],
                                       AnglingData[Sex == "Male", .N],
                                       AnglingData[is.na(Sex), .N]))

# Gender no response versus responses check
ResponseComparison <- matrix(data = c(sum(GenderComparisonDF$Total[1:2]), GenderComparisonDF$Total[3],
                                      sum(GenderComparisonDF$Survey[1:2]), GenderComparisonDF$Survey[3]
                                      ), nrow = 2, ncol = 2, byrow = FALSE)
dimnames(ResponseComparison) <- list(c("Response", "NoResponse"), c("Community", "Sample"))
GenderComparison_ResVsNon <- fisher.test(ResponseComparison)


# Compare responses male versus female
ResponseComparisonSex <- matrix(data = c(sum(GenderComparisonDF$Total[1]), GenderComparisonDF$Total[2],
                                      sum(GenderComparisonDF$Survey[1]), GenderComparisonDF$Survey[2]
                                      ), nrow = 2, ncol = 2, byrow = FALSE)
dimnames(ResponseComparisonSex) <- list(c("Female", "Male"), c("Community", "Sample"))
GenderComparison_Sex <- fisher.test(ResponseComparisonSex)

#################################
#### Comparison by age group ####
#################################
RodAgeDatafilename <- "RodLicenceNumbersByAgeGroup.csv"
RodAgeAnglingData <- read.csv(RodAgeDatafilename, header = TRUE)
setorderv(AnglingData, "AgeGroup")
AgeComparisonDF <- cbind(RodAgeAnglingData,
                            Survey = AnglingData[!is.na(AgeGroup), .N, AgeGroup]$N)
# Output a table of the numbers, ratio and proportion for survey and rod licences
AgeComparisonDF <- setDT(AgeComparisonDF)
AgeComparisonDF[, RatioNum := Number/AgeComparisonDF$Number[1]]
AgeComparisonDF[, RatioSurvey := Survey/AgeComparisonDF$Survey[1]]
AgeComparisonDF[, ProportionNumber := Number/sum(AgeComparisonDF$Number)]
AgeComparisonDF[, ProportionSurvey := Survey/sum(AgeComparisonDF$Survey)]

colnames(AgeComparisonDF) <- c("Age Group", "Rod Licences", "AT Survey", "Ratio Rod Licences", "Ratio AT Survey", "Proportion Rod Licences", "Proportion AT Survey")

# Create a table to output
AgeComparisonDFTable <- kbl(AgeComparisonDF) %>%
  kable_paper("striped", full_width = FALSE)

# Run a stats analysis
AgeComparisonKSTest <- ks.test(AgeComparisonDF$`Rod Licences`,
                               AgeComparisonDF$`AT Survey`)

########################
#### Post Hoc Tests ####
########################
AgePostHoc_17 <- binom.test(AgeComparisonDF$`AT Survey`[1], sum(AgeComparisonDF$`AT Survey`) , AgeComparisonDF$`Proportion Rod Licences`[1])
AgePostHoc_18_24 <- binom.test(AgeComparisonDF$`AT Survey`[2], sum(AgeComparisonDF$`AT Survey`) , AgeComparisonDF$`Proportion Rod Licences`[2])
AgePostHoc_25_34 <- binom.test(AgeComparisonDF$`AT Survey`[3], sum(AgeComparisonDF$`AT Survey`) , AgeComparisonDF$`Proportion Rod Licences`[3])
AgePostHoc_35_44 <- binom.test(AgeComparisonDF$`AT Survey`[4], sum(AgeComparisonDF$`AT Survey`) , AgeComparisonDF$`Proportion Rod Licences`[4])
AgePostHoc_45_54 <- binom.test(AgeComparisonDF$`AT Survey`[5], sum(AgeComparisonDF$`AT Survey`) , AgeComparisonDF$`Proportion Rod Licences`[5])
AgePostHoc_55_64 <- binom.test(AgeComparisonDF$`AT Survey`[6], sum(AgeComparisonDF$`AT Survey`) , AgeComparisonDF$`Proportion Rod Licences`[6])
AgePostHoc_65 <- binom.test(AgeComparisonDF$`AT Survey`[7], sum(AgeComparisonDF$`AT Survey`) , AgeComparisonDF$`Proportion Rod Licences`[7])

AgeComparisonDF$ConfInt1 <- c(AgePostHoc_17$conf.int[1], AgePostHoc_18_24$conf.int[1], AgePostHoc_25_34$conf.int[1], AgePostHoc_35_44$conf.int[1],AgePostHoc_45_54$conf.int[1],AgePostHoc_55_64$conf.int[1],AgePostHoc_65$conf.int[1])
AgeComparisonDF$ConfInt2 <- c(AgePostHoc_17$conf.int[2], AgePostHoc_18_24$conf.int[2], AgePostHoc_25_34$conf.int[2], AgePostHoc_35_44$conf.int[2],AgePostHoc_45_54$conf.int[2],AgePostHoc_55_64$conf.int[2],AgePostHoc_65$conf.int[2])
AgeComparisonDF[, ConfInt1 := `Proportion AT Survey` - ConfInt1]
AgeComparisonDF[, ConfInt2 := ConfInt2 - `Proportion AT Survey`]

AgeComparisonDF$PValue <- c(AgePostHoc_17$p.value, AgePostHoc_18_24$p.value, AgePostHoc_25_34$p.value, AgePostHoc_35_44$p.value,AgePostHoc_45_54$p.value,AgePostHoc_55_64$p.value,AgePostHoc_65$p.value)

# Produce a plot of the data
AgeComparisonWithRod <- plot_ly(data = AgeComparisonDF, type = 'bar') %>%
  add_trace(x = ~`Age Group`,
            y = ~`Proportion Rod Licences`,
            marker = list(color = 'rgb(100,100,100)',
                          line = list(color = 'black', width = 1)),
            name = "Licences") %>%
  add_trace(x = ~`Age Group`,
            y = ~`Proportion AT Survey`,
            marker = list(color = 'rgb(200,200,200)',
                          line = list(color = 'black', width = 1)),
            name = "Survey",
            error_y = list(array = AgeComparisonDF$ConfInt1,
                           type = 'data', color = 'black')) %>%
  layout(xaxis = list(title = "Age Group"),
         yaxis = list(title = "Proportion of Total", showline = TRUE))

In this section we compare the survey group to the overall angling community as defined by those taking up a rod licence in 2018. Note that this is for England only whereas the survey includes a small number of anglers from Wales and Scotland.

Looking at the number of unknown responses to question of the sex of the angler there was a significant difference between the rod licence group (18.14% of non-responses) compared to the survey sample of 1.03% (Fisher exact test p value < 0.01).

For those that responded, in the rod licence group there were 4.3% that were female and 95.7% that were male. This compares to 2.18% females in the survey and 97.82% males suggesting an over-representation of males in the survey group. This difference was significant by Fishers exact test (p < 0.01).

Looking at the profile of ages for the survey group and rod licences it is clear that there is a bias toward older groups in the survey. The plot below shows the proportion of anglers in the 7 age groups that took out a rod licence in 2018 (Licences) or responded to the survey (Survey). Here the error bars are the 95% confidence intervals taken from a binomial test using the proportion of anglers in the age group with a rod licence as the probability of success.

The figures are also show as a table:

Age Group Rod Licences AT Survey Ratio Rod Licences Ratio AT Survey Proportion Rod Licences Proportion AT Survey
17 years and under 67181 48 1.000000 1.000000 0.0536994 0.0137025
18 - 24 years 122872 55 1.828969 1.145833 0.0982146 0.0157008
25 - 34 years 218137 223 3.247004 4.645833 0.1743623 0.0636597
35 - 44 years 193376 378 2.878433 7.875000 0.1545702 0.1079075
45 - 54 years 228225 584 3.397166 12.166667 0.1824259 0.1667142
55 - 64 years 198480 976 2.954407 20.333333 0.1586500 0.2786183
65 + years 222785 1239 3.316191 25.812500 0.1780776 0.3536968

Unsurprisingly, the difference was significant using a Kolmogorov-Smirnov Test (p = 5.8275058^{-4}).


Results Section 2: Demographics of the study group

3541 angling responses were collected over the three-month survey period and almost all respondents (96.84%) were male, with the greatest proportion of respondents aged 65+ years (34.99%) and 55-64 (27.56%).

Coarse angling was practiced by the majority of respondents (87.32%), with 64.78% carp fishing and 30.98% coarse fishing with a lure. 25.39% of respondents indicated that they practiced game fishing, 17.85% sea angling, and 8.42% competition angling.

Of all respondents, 56.74% fished at least once a fortnight and 41.49% fished once a week or more. Fishing habits varied between angler types. Sea anglers fished less often compared to other groups, with 41.46% and 58.54% fishing weekly and fortnightly respectively. Competitive anglers fished the most frequently, with 64.43% and 77.52% at least once a fortnight.

Almost a third of all respondents (30.92%) went fishing abroad at least once a year.

##################################################
# Possible table for results for demographics
# Rows are Age Groups
# Columns are : Number
#             : Percentage of total
#             : Male/Female ratio for the group
#             : Angling Type
#             : Number of anglers 
#             : Percentage of total anglers
#             : Percentage of anglers in age group
###################################################
Grp1 <- data.frame(rbind(
  cbind('Age Group' = '65 + years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Coarse',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Coarse == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & Coarse == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '65 + years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Game',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Game == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & Game == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '65 + years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Sea',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Sea == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & Sea == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '65 + years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Competition',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Competition == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "65 + years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & Competition == 1, .N] * 100, digits = 2))
))

Grp2 <- data.frame(rbind(
  cbind('Age Group' = '55 - 64 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Coarse',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Coarse == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & Coarse == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '55 - 64 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Game',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Game == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & Game == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '55 - 64 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Sea',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Sea == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & Sea == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '55 - 64 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Competition',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Competition == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "55 - 64 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & Competition == 1, .N] * 100, digits = 2))
))

Grp3 <- data.frame(rbind(
  cbind('Age Group' = '45 - 54 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Coarse',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Coarse == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & Coarse == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '45 - 54 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Game',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Game == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & Game == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '45 - 54 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Sea',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Sea == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & Sea == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '45 - 54 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Competition',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Competition == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "45 - 54 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & Competition == 1, .N] * 100, digits = 2))
))

Grp4 <- data.frame(rbind(
  cbind('Age Group' = '35 - 44 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Coarse',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Coarse == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & Coarse == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '35 - 44 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Game',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Game == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & Game == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '35 - 44 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Sea',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Sea == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & Sea == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '35 - 44 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Competition',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Competition == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "35 - 44 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & Competition == 1, .N] * 100, digits = 2))
))

Grp5 <- data.frame(rbind(
  cbind('Age Group' = '25 - 34 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Coarse',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Coarse == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & Coarse == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '25 - 34 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Game',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Game == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & Game == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '25 - 34 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Sea',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Sea == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & Sea == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '25 - 34 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Competition',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Competition == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "25 - 34 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & Competition == 1, .N] * 100, digits = 2))
))

Grp6 <- data.frame(rbind(
  cbind('Age Group' = '18 - 24 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years",.N ],
      'Ratio Female:Male' = paste0("0:", AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" &  Sex == "Male",.N ]),
      'Angling Type' = 'Coarse',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Coarse == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & Coarse == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '18 - 24 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years",.N ],
      'Ratio Female:Male' = paste0("0:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" &  Sex == "Male",.N ], digits = 0)),
      'Angling Type' = 'Game',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Game == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & Game == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '18 - 24 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years",.N ],
      'Ratio Female:Male' = paste0("0:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" &  Sex == "Male",.N ], digits = 0)),
      'Angling Type' = 'Sea',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Sea == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & Sea == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '18 - 24 years',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years",.N ],
      'Ratio Female:Male' = paste0("0:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" &  Sex == "Male",.N ], digits = 0)),
      'Angling Type' = 'Competition',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Competition == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "18 - 24 years" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & Competition == 1, .N] * 100, digits = 2))
))

Grp7 <- data.frame(rbind(
  cbind('Age Group' = '17 years and under',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Coarse',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Coarse == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Coarse == 1, .N]/AnglingData[!is.na(AgeGroup) & Coarse == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '17 years and under',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Game',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Game == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Game == 1, .N]/AnglingData[!is.na(AgeGroup) & Game == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '17 years and under',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Sea',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Sea == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Sea == 1, .N]/AnglingData[!is.na(AgeGroup) & Sea == 1, .N] * 100, digits = 2)),
  cbind('Age Group' = '17 years and under',
      'Total' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under",.N ],
      'Ratio Female:Male' = paste0("1:", round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Male",.N ]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" &  Sex == "Female",.N ], digits = 0)),
      'Angling Type' = 'Competition',
      'Number of Anglers' = AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Competition == 1, .N],
      'Percentage of All Anglers' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under", .N] * 100, digits = 2),
      'Percentage of Angling Type' = round(AnglingData[!is.na(AgeGroup) & AgeGroup == "17 years and under" & Competition == 1, .N]/AnglingData[!is.na(AgeGroup) & Competition == 1, .N] * 100, digits = 2))
))

Table1_DemographicsDF <- data.frame(rbind(
  Grp1, Grp2, Grp3, Grp4, Grp5, Grp6, Grp7
))

Table1_DemographicsTable <- kbl(Table1_DemographicsDF) %>%
  kable_paper(full_width = FALSE)

2.1. Table of respondents to survey

Here is the demographic of the respondents in Tabular form.

Age.Group Total Ratio.Female.Male Angling.Type Number.of.Anglers Percentage.of.All.Anglers Percentage.of.Angling.Type
65 + years 1239 1:52 Coarse 1031 83.21 33.56
65 + years 1239 1:52 Game 366 29.54 40.89
65 + years 1239 1:52 Sea 195 15.74 31
65 + years 1239 1:52 Competition 94 7.59 31.97
55 - 64 years 976 1:48 Coarse 847 86.78 27.57
55 - 64 years 976 1:48 Game 282 28.89 31.51
55 - 64 years 976 1:48 Sea 209 21.41 33.23
55 - 64 years 976 1:48 Competition 97 9.94 32.99
45 - 54 years 584 1:52 Coarse 525 89.9 17.09
45 - 54 years 584 1:52 Game 136 23.29 15.2
45 - 54 years 584 1:52 Sea 104 17.81 16.53
45 - 54 years 584 1:52 Competition 48 8.22 16.33
35 - 44 years 378 1:36 Coarse 365 96.56 11.88
35 - 44 years 378 1:36 Game 66 17.46 7.37
35 - 44 years 378 1:36 Sea 67 17.72 10.65
35 - 44 years 378 1:36 Competition 36 9.52 12.24
25 - 34 years 223 1:30 Coarse 207 92.83 6.74
25 - 34 years 223 1:30 Game 30 13.45 3.35
25 - 34 years 223 1:30 Sea 37 16.59 5.88
25 - 34 years 223 1:30 Competition 10 4.48 3.4
18 - 24 years 55 0:54 Coarse 54 98.18 1.76
18 - 24 years 55 0:54 Game 6 10.91 0.67
18 - 24 years 55 0:54 Sea 11 20 1.75
18 - 24 years 55 0:54 Competition 4 7.27 1.36
17 years and under 48 1:9 Coarse 43 89.58 1.4
17 years and under 48 1:9 Game 9 18.75 1.01
17 years and under 48 1:9 Sea 6 12.5 0.95
17 years and under 48 1:9 Competition 5 10.42 1.7
library(plotly)

radarplot_survey <- plot_ly(
    type = 'scatterpolar',
    mode = 'markers',
    fill = 'toself'
  ) 
radarplot_survey <- radarplot_survey %>%
  add_trace(
    mode = 'markers',
    r = c(AnglingData[Coarse == 1 & AgeGroup == "65 + years", .N]/AnglingData[Coarse == 1, .N] * 100, 
          AnglingData[Coarse == 1 & AgeGroup == "55 - 64 years", .N]/AnglingData[Coarse == 1, .N] * 100, 
          AnglingData[Coarse == 1 & AgeGroup == "45 - 54 years", .N]/AnglingData[Coarse == 1, .N] * 100, 
          AnglingData[Coarse == 1 & AgeGroup == "35 - 44 years", .N]/AnglingData[Coarse == 1, .N] * 100, 
          AnglingData[Coarse == 1 & AgeGroup == "25 - 34 years", .N]/AnglingData[Coarse == 1, .N] * 100,
          AnglingData[Coarse == 1 & AgeGroup == "18 - 24 years", .N]/AnglingData[Coarse == 1, .N] * 100,
          AnglingData[Coarse == 1 & AgeGroup == "17 years and under", .N]/AnglingData[Coarse == 1, .N] * 100),
    theta = c('65 + years','55 - 64 years','45 - 54 years', '35 - 44 years', '25 - 34 years', '18 - 24 years', '17 years and under'),
    name = 'Coarse Anglers'
  ) 
radarplot_survey <- radarplot_survey %>%
  add_trace(
    mode = 'markers',
    r = c(AnglingData[Sea == 1 & AgeGroup == "65 + years", .N]/AnglingData[Sea == 1, .N] * 100, 
          AnglingData[Sea == 1 & AgeGroup == "55 - 64 years", .N]/AnglingData[Sea == 1, .N] * 100, 
          AnglingData[Sea == 1 & AgeGroup == "45 - 54 years", .N]/AnglingData[Sea == 1, .N] * 100, 
          AnglingData[Sea == 1 & AgeGroup == "35 - 44 years", .N]/AnglingData[Sea == 1, .N] * 100, 
          AnglingData[Sea == 1 & AgeGroup == "25 - 34 years", .N]/AnglingData[Sea == 1, .N] * 100,
          AnglingData[Sea == 1 & AgeGroup == "18 - 24 years", .N]/AnglingData[Sea == 1, .N] * 100,
          AnglingData[Sea == 1 & AgeGroup == "17 years and under", .N]/AnglingData[Sea == 1, .N] * 100),
    theta = c('65 + years','55 - 64 years','45 - 54 years', '35 - 44 years', '25 - 34 years', '18 - 24 years', '17 years and under'),
    name = 'Sea Anglers'
  ) 
radarplot_survey <- radarplot_survey %>%
  add_trace(
    mode = 'markers',
    r = c(AnglingData[Competition == 1 & AgeGroup == "65 + years", .N]/AnglingData[Competition == 1, .N] * 100, 
          AnglingData[Competition == 1 & AgeGroup == "55 - 64 years", .N]/AnglingData[Competition == 1, .N] * 100, 
          AnglingData[Competition == 1 & AgeGroup == "45 - 54 years", .N]/AnglingData[Competition == 1, .N] * 100, 
          AnglingData[Competition == 1 & AgeGroup == "35 - 44 years", .N]/AnglingData[Competition == 1, .N] * 100, 
          AnglingData[Competition == 1 & AgeGroup == "25 - 34 years", .N]/AnglingData[Competition == 1, .N] * 100,
          AnglingData[Competition == 1 & AgeGroup == "18 - 24 years", .N]/AnglingData[Competition == 1, .N] * 100,
          AnglingData[Competition == 1 & AgeGroup == "17 years and under", .N]/AnglingData[Competition == 1, .N] * 100),
    theta = c('65 + years','55 - 64 years','45 - 54 years', '35 - 44 years', '25 - 34 years', '18 - 24 years', '17 years and under'),
    name = 'Competition Anglers'
  ) 
radarplot_survey <- radarplot_survey %>%
  layout(
    polar = list(
      radialaxis = list(
        visible = T,
        range = c(0,40)
      )
    )
  )

2.2. Radar plot of angling types performed and the age groups of the anglers

Here the data is presented as a radar plot with the percentage performing the different angling types on the radial axis and the age groups on the circular axis.

Figure 1a. Radar plot of the percentage of anglers that practice coarse, game, competition and sea angling by age grouping.

2.3 Do the age groups have the same proportions of angling frequency?

In this section of the demographic analysis we look at how age group affects the frequency of angling. It is anticipated that older anglers would be fishing more often. This section analyses this by number of anglers but also by the proportion of anglers in each age group.

###########################################################################################
# In this section a heat map is produced with each cell indicating the number of anglers
# and another with the proportion of anglers in that age group
############################################################################################

# Create a data table with the numbers and proportions
OverallAgeVersusFreqDataTable <- AnglingData[!is.na(AgeGroup) & !is.na(AnglingFreq),.N, by = c("AnglingFreq")]
OverallAgeVersusFreqDataTable[, PropAnglers := N/OverallAgeVersusFreqDataTable[,sum(N)]]
OverallAgeVersusFreqDataTable[, AgeGroup := "All"]

AgeVersusFreqDataTable <- AnglingData[!is.na(AgeGroup) & !is.na(AnglingFreq),.N, by = c("AgeGroup", "AnglingFreq")]
AgeVersusFreqDataTable[AgeGroup == "17 years and under", PropAnglers := N/(AgeVersusFreqDataTable[AgeGroup == "17 years and under", sum(N)])]
AgeVersusFreqDataTable[AgeGroup == "18 - 24 years", PropAnglers := N/(AgeVersusFreqDataTable[AgeGroup == "18 - 24 years", sum(N)])]
AgeVersusFreqDataTable[AgeGroup == "25 - 34 years", PropAnglers := N/(AgeVersusFreqDataTable[AgeGroup == "25 - 34 years", sum(N)])]
AgeVersusFreqDataTable[AgeGroup == "35 - 44 years", PropAnglers := N/(AgeVersusFreqDataTable[AgeGroup == "35 - 44 years", sum(N)])]
AgeVersusFreqDataTable[AgeGroup == "45 - 54 years", PropAnglers := N/(AgeVersusFreqDataTable[AgeGroup == "45 - 54 years", sum(N)])]
AgeVersusFreqDataTable[AgeGroup == "55 - 64 years", PropAnglers := N/(AgeVersusFreqDataTable[AgeGroup == "55 - 64 years", sum(N)])]
AgeVersusFreqDataTable[AgeGroup == "65 + years", PropAnglers := N/(AgeVersusFreqDataTable[AgeGroup == "65 + years", sum(N)])]

# Annoyingly data table does not count zero totals so adding manually for 17yr
AgeVersusFreqDataTable <- rbind(AgeVersusFreqDataTable,
                                data.frame(AgeGroup = "17 years and under", AnglingFreq = 7,  N = 0, PropAnglers = 0), 
                                use.names = FALSE)

setorderv(AgeVersusFreqDataTable, cols = c("AgeGroup", "AnglingFreq"), order = c(1,1))

# Build the matrices
AgeVersusFreqNoMatrix <- matrix(data = AgeVersusFreqDataTable[, .(N)]$N,
                                nrow = 7, ncol = 8, byrow = TRUE)
AgeVersusFreqPropMatrix <- matrix(data = AgeVersusFreqDataTable[, .(PropAnglers)]$PropAnglers,
                                nrow = 7, ncol = 8, byrow = TRUE)

# Generate the heat map plots
library(plotly)

AgeVersusFreqNoHeatmap <- plot_ly(z = AgeVersusFreqNoMatrix, type = 'heatmap',colors = "Blues",
                                  x = AnglingFreqGroups, 
                                  y = AnglingAgeGroups,
                                  zauto = FALSE,
                                  zmax = 400, zmin = 0,
                                  colorbar = list(len = 1, orientation = "v", x = 1.02, y = 1, 
                                                  title = list(side = 'top', text = 'Number of Anglers'))) %>%
  layout(xaxis = list(ticks = ""),
         yaxis = list(ticks = ""))


AgeVersusFreqPropHeatmap <- plot_ly(z = AgeVersusFreqPropMatrix, type = 'heatmap',colors = "Blues",
                                    x = AnglingFreqGroups, 
                                  y = AnglingAgeGroups,
                                  zauto = FALSE,
                                  zmax = 0.3, zmin = 0,
                                  colorbar = list(len = 1, orientation = "v", x = 1.02, y = 1, 
                                                  title = list(side = 'top', text = 'Proportion of Age Group'))) %>%
  layout(xaxis = list(ticks = ""),
         yaxis = list(ticks = ""))

#### Generate a stacked bar for angling frequency and age groups
AgeVersusFreqDataTableBar <- rbind(AgeVersusFreqDataTable, OverallAgeVersusFreqDataTable)
AgeVersusFreqStackedBar <- plot_ly(data = AgeVersusFreqDataTableBar, type = 'bar') %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 1],
            y = ~PropAnglers[AnglingFreq == 1],
            name = AnglingFreqGroups[1]) %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 2],
            y = ~PropAnglers[AnglingFreq == 2],
            name = AnglingFreqGroups[2]) %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 3],
            y = ~PropAnglers[AnglingFreq == 3],
            name = AnglingFreqGroups[3]) %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 4],
            y = ~PropAnglers[AnglingFreq == 4],
            name = AnglingFreqGroups[4]) %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 5],
            y = ~PropAnglers[AnglingFreq == 5],
            name = AnglingFreqGroups[5]) %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 6],
            y = ~PropAnglers[AnglingFreq == 6],
            name = AnglingFreqGroups[6]) %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 7],
            y = ~PropAnglers[AnglingFreq == 7],
            name = AnglingFreqGroups[7]) %>%
  add_trace(x = ~AgeGroup[AnglingFreq == 8],
            y = ~PropAnglers[AnglingFreq == 8],
            name = AnglingFreqGroups[8]) %>%
  layout(barmode = 'stack',
         xaxis = list(title = "Age Group"),
         yaxis = list(title = "Proportion of Age Group"))

The heatmap showing the number of anglers is shown below:

And, by proportion of each age group:

.

These heatmaps suggest that although there are more anglers that are older and fish more often in the survey, the proportion of anglers and how often they fish is less dependent on age. In all age groups there is a similar distribution of anglers based on how often they fish.

The proportion of anglers in each age group for each angling frequency appear to be similar across the age groups. This is shown in this bar chart.

Section 2.4 How significant are differences in angling frequency between age groups (Kolmogorov-Smirnov Tests)

To check whether there was any significant difference between the profile of angling frequency of each age group and anglers as a whole as series onf Kolmogorov-Smirnov 2-sample tests were performed using the probability distribution of all anglers versus the age groups.

And a table of the results from the KS test is:

AgeGroup PValue DStat
17 years and under 0.9878608 0.2321429
18 - 24 years 0.9639452 0.2500000
25 - 34 years 0.9639452 0.2500000
35 - 44 years 1.0000000 0.1250000
45 - 54 years 1.0000000 0.1250000
55 - 64 years 1.0000000 0.1250000
65 + years 1.0000000 0.1250000

Showing no significant different between the distribution of angling frequency in each age group against the angling frequency overall.


#######################################################################
#### Section 2 - Cleaning and Drying of kit by anglers ################
#######################################################################
# Section to show the how the anglers cleaned and dried kit
#######################################################################
DryFreq_Df <- data.frame(
  Frequency = c("After every trip", "After 2-5 trips", "After 6-10 trips", "After 11 or more trips", "Do not dry kit", "No response"),
  Numbers = c(AnglingData[DryFreq == "After every trip", .N],
              AnglingData[DryFreq == "After 2-5 trips", .N],
              AnglingData[DryFreq == "After 6-10 trips", .N],
              AnglingData[DryFreq == "After 11+ trips", .N],
              AnglingData[DryFreq == "Do not dry kit", .N],
              AnglingData[is.na(DryFreq), .N])
)
DryFreq_Df$Percentage <- round(DryFreq_Df$Numbers/AnglingData[,.N] * 100, digits = 2)
DryFreq_Df$PerResponse <- round(DryFreq_Df$Numbers/AnglingData[!is.na(DryFreq),.N] * 100, digits = 2)
DryFreq_Df$PerResponse[6] <- NA

# Create a table to output
DryFreqTable <- kbl(DryFreq_Df) %>%
  kable_paper("striped", full_width = FALSE)

Results Section 3 - Implementation of cleaning and drying of kit

Overview

In this section, angler responses are used to provide an overall understanding of cleaning and drying performed by the anglers and whether any particular group of anglers do this more or less.

In total 2602 (73.71%) anglers reported cleaning their kit. Of these, over half (51.08%) used hot water to clean fishing equipment, 28.29% used cold water and 34.97% used a cleaning product such as a disinfectants including Virkon. Milton, Jeyes, Dettol or antibacterial gel (9.11%), oils and waxes including WD40 and polish (1.11%), and soap including washing up liquid (26.79%). 736 anglers (20.85%) used both water and a cleaning product with only 174 anglers (4.93%) only using cleaning product alone.

Only 281 (7.96%) saying they did not clean kit and equipment after fishing. (Percentage of all respondents regardless of whether they answered the question).

In total 2595 (73.51%) anglers reported drying their kit (waders and/or equipment; as a percentage of ALL respondents).

Of the 2779 that responded to the question about drying wellies or waders, 1620 (58.29%) anglers dried their waders, whilst 910 (32.75%) did not use waders or wellies, and 249(8.96%) did not dry waders or wellies after use (751 did not respond). Of those anglers that used wellies and responded to the question, 1620 (86.68%) dried wellies and 249 (13.32%)

Of the 2771 that responded to the question about drying equipment, 2595 (93.65%) anglers dried their equipment, whilst 176(6.35%) did not dry equipment after use (759 did not respond).

In summary, of the 2764 anglers that gave a response to both questions on drying waders and equipment, 2408 (87.12%) anglers either dried both waders and equipment, or just equipment if waders were not used. There were 68 (2.46%) anglers that did not dry either waders or equipment, and 75 (2.71%) that did not use waders and did not dry equipment. In total, 143 (5.17%) did not dry waders and/or equipment when used in a fishing trip.

In total 2623 anglers reported on how often they dried their kit. Of these, 2342 (89.29%) reported drying waders and/or equipment after every trip. A table of the results is shown below:

Frequency Numbers Percentage PerResponse
After every trip 2342 66.35 89.29
After 2-5 trips 178 5.04 6.79
After 6-10 trips 19 0.54 0.72
After 11 or more trips 9 0.25 0.34
Do not dry kit 75 2.12 2.86
No response 907 25.69 NA

Section 3.1 Network analysis of the cleaning implementation involved

Here we present a figure that is a network flow diagram to show the number of anglers that clean kit, how they clean kit, and whether they then dry the kit.

#### Create a network graph of cleaning by all anglers ####

library(igraph)
library(ggplot2)
library(network)
library(ggnetwork)
library(sna)
library(GGally)
library(RColorBrewer)
# define the layout manually to control appearance
l <- data.frame(x = c(0.15, 0.15, 0.3, 0.3, 0.65, 0.80, 0.80),
                y = c(0.95, 0.25, 0.95, 0.5, 0.4, 0.95, 0.25))
l <- as.matrix(l)

# Use visnetwork
#### All anglers ####
library(visNetwork)
CleaningNetworkVerticesDFV3 <- data.frame(
id = c("N01", "N02", "N03", "N04", "N05", "N06", "N07", "N08"),
level = c(1, 2, 2, 3, 3, 4, 5, 5),
group = c("A", "B", "C", "B", "D", "D", "B", "D"),
shape = c("circle", "dot", "dot", "dot", "dot", "dot", "dot", "dot"),
shadow = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
title = c("Origin", "CCD", "Hazard", "CCD", "Clean", "Clean", "CCD", "Hazard"),
label = c("", "Clean", "Don't Clean", "Hot Water", "Cold Water", "Cleaning Product", "Dry", "Don't Dry"),
size = c(0.25,
              AnglingData[CleanYN == 1, .N]/AnglingData[!is.na(CleanYN), .N], 
              AnglingData[CleanYN == 0, .N]/AnglingData[!is.na(CleanYN), .N],
              AnglingData[HotWaterYN == 1, .N]/AnglingData[!is.na(CleanYN), .N], 
              AnglingData[ColdWaterYN == 1, .N]/AnglingData[!is.na(CleanYN), .N],
              AnglingData[CleaningProdYN == 1, .N]/AnglingData[!is.na(CleanYN), .N],
              AnglingData[DryYN == 1, .N]/AnglingData[!is.na(CleanYN), .N],
              AnglingData[DryYN == 0, .N]/AnglingData[!is.na(CleanYN), .N]) * 25,
borderWidth = c(2,2,1,2,1,1,2,1),
font.size = rep(14,8),
font.background = "white",
color.background = c("white", "#4c4c4c", "#e5e5e5", "#4c4c4c", "#7f7f7f", "7f7f7f", "#4c4c4c", "#e5e5e5"),
color.border = c("black", "black", "black", "black", "black", "black", "black", "black"),
color.highlight.background = rep("orange", 8),
color.highlight.border = rep("darkred", 8),
stringsAsFactors = FALSE
)

CleaningNetworkEdgesDFV3 <- data.frame(
from = c("N01", "N01",  "N02", "N02", "N02", "N03", "N03","N04","N05","N04","N05", "N04","N05", "N06", "N06", "N06", "N02"),
to = c("N02", "N03",  "N04", "N05", "N06", "N07", "N08", "N06", "N06", "N07", "N07", "N08", "N08", "N07", "N07", "N08", "N08"),
type = c("CCD", "Hazard",  "CCD","Clean","Clean","Clean","Hazard","Clean","Clean","CCD","Clean","Hazard", "Hazard", "Clean", "Clean","Hazard", "Hazard"),
weight = c(1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
shadow = c(TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
smooth = rep(TRUE, 17),
color = c("#4c4c4c",  "#b2b2b2", "#4c4c4c","#7f7f7f","#7f7f7f","#7f7f7f","#b2b2b2","#4c4c4c","#7f7f7f","#4c4c4c","#7f7f7f","#b2b2b2", "#b2b2b2", "#4c4c4c","#7f7f7f", "#b2b2b2", "#b2b2b2"),
width = c(
  AnglingData[CleanYN == 1, .N]/AnglingData[!is.na(CleanYN), .N], # Origin to clean
  AnglingData[CleanYN == 0, .N]/AnglingData[!is.na(CleanYN), .N], # Origin to don't clean
  AnglingData[CleanYN == 1 & HotWaterYN == 1, .N]/AnglingData[CleanYN == 1, .N], # Clean to hot water edge
                    AnglingData[CleanYN == 1 & ColdWaterYN == 1, .N]/AnglingData[CleanYN == 1, .N], # Clean to cold water edge
                    AnglingData[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/AnglingData[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    AnglingData[CleanYN == 0 & DryYN == 1, .N]/AnglingData[CleanYN == 0, .N], # Don't clean but dry kit
                    AnglingData[CleanYN == 0 & DryYN == 0, .N]/AnglingData[CleanYN == 0, .N], # Don't clean and do not dry kit
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 1, .N]/AnglingData[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    AnglingData[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/AnglingData[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AnglingData[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    AnglingData[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AnglingData[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AnglingData[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    AnglingData[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AnglingData[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AnglingData[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    AnglingData[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AnglingData[CleaningProdYN == 1, .N], # Use cleaning product (but not hot water) & dry kit
                    AnglingData[CleaningProdYN == 1 & DryYN == 0, .N]/AnglingData[CleaningProdYN == 1, .N], # Use cleaning product & don't dry kit
  AnglingData[CleanYN == 1 & DryYN == 0, .N]/AnglingData[!is.na(CleanYN), .N] # Clean but don't dry kit
                    ) * 8,
label = format(round(c(
  AnglingData[CleanYN == 1, .N]/AnglingData[!is.na(CleanYN), .N], # Origin to clean
  AnglingData[CleanYN == 0, .N]/AnglingData[!is.na(CleanYN), .N], # Origin to don't clean
  AnglingData[CleanYN == 1 & HotWaterYN == 1, .N]/AnglingData[CleanYN == 1, .N], # Clean to hot water edge
                    AnglingData[CleanYN == 1 & ColdWaterYN == 1, .N]/AnglingData[CleanYN == 1, .N], # Clean to cold water edge
                    AnglingData[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/AnglingData[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    AnglingData[CleanYN == 0 & DryYN == 1, .N]/AnglingData[CleanYN == 0, .N], # Don't clean but dry kit
                    AnglingData[CleanYN == 0 & DryYN == 0, .N]/AnglingData[CleanYN == 0, .N], # Don't clean and do not dry kit
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 1, .N]/AnglingData[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    AnglingData[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/AnglingData[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AnglingData[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    AnglingData[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AnglingData[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AnglingData[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    AnglingData[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AnglingData[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    AnglingData[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AnglingData[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    AnglingData[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AnglingData[CleaningProdYN == 1, .N], # Use cleaning product (but not hot water) & dry kit
                    AnglingData[CleaningProdYN == 1 & DryYN == 0, .N]/AnglingData[CleaningProdYN == 1, .N], # Use cleaning product & don't dry kit
                    AnglingData[CleanYN == 1 & DryYN == 0, .N]/AnglingData[!is.na(CleanYN), .N] # Clean but don't dry kit
                    ) * 100, digits = 1), nsmall = 1),
font.size = rep(12,17),
font.align = c("middle", "middle","middle","bottom","middle","bottom","middle","middle","middle","middle","middle","middle","middle","middle","middle","middle", "middle"),
stringsAsFactors = FALSE
)

# Create the plot

AllAngCleanVisNetwork <- visNetwork(nodes = CleaningNetworkVerticesDFV3,
           edges = CleaningNetworkEdgesDFV3,
           height = "800px", width = "600px") %>%
  visIgraphLayout(layout = "layout_with_sugiyama") %>% 
  visExport(type = "png", name = "AllAnglersBiosecurityNetwork", 
   float = "left", label = "Save network", background = "#fff", style= "")

# Repeat for different angling frequency
#### Weekly Anglers ####
WeeklyAnglers <- AnglingData[NewAnglingFreq == 1, ]
WeeklyAnglersVerticesDF <- data.frame(
id = c("N01", "N02", "N03", "N04", "N05", "N06", "N07", "N08"),
level = c(1, 2, 2, 3, 3, 4, 5, 5),
group = c("A", "B", "C", "B", "D", "D", "B", "D"),
shape = c("circle", "dot", "dot", "dot", "dot", "dot", "dot", "dot"),
shadow = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
title = c("Origin", "CCD", "Hazard", "CCD", "Clean", "Clean", "CCD", "Hazard"),
label = c("", "Clean", "Don't Clean", "Hot Water", "Cold Water", "Cleaning Product", "Dry", "Don't Dry"),
size = c(0.25,
              WeeklyAnglers[CleanYN == 1, .N]/WeeklyAnglers[!is.na(CleanYN), .N], 
              WeeklyAnglers[CleanYN == 0, .N]/WeeklyAnglers[!is.na(CleanYN), .N],
              WeeklyAnglers[HotWaterYN == 1, .N]/WeeklyAnglers[!is.na(CleanYN), .N], 
              WeeklyAnglers[ColdWaterYN == 1, .N]/WeeklyAnglers[!is.na(CleanYN), .N],
              WeeklyAnglers[CleaningProdYN == 1, .N]/WeeklyAnglers[!is.na(CleanYN), .N],
              WeeklyAnglers[DryYN == 1, .N]/WeeklyAnglers[!is.na(CleanYN), .N],
              WeeklyAnglers[DryYN == 0, .N]/WeeklyAnglers[!is.na(CleanYN), .N]) * 25,
borderWidth = c(2,2,1,2,1,1,2,1),
font.size = rep(14,8),
font.background = "white",
color.background = c("white", "#4c4c4c", "#e5e5e5", "#4c4c4c", "#7f7f7f", "7f7f7f", "#4c4c4c", "#e5e5e5"),
color.border = c("black", "black", "black", "black", "black", "black", "black", "black"),
color.highlight.background = rep("orange", 8),
color.highlight.border = rep("darkred", 8),
stringsAsFactors = FALSE
)

WeeklyAnglersEdgesDF <- data.frame(
from = c("N01", "N01",  "N02", "N02", "N02", "N03", "N03","N04","N05","N04","N05", "N04","N05", "N06", "N06", "N06"),
to = c("N02", "N03",  "N04", "N05", "N06", "N07", "N08", "N06", "N06", "N07", "N07", "N08", "N08", "N07", "N07", "N08"),
type = c("CCD", "Hazard",  "CCD","Clean","Clean","Clean","Hazard","Clean","Clean","CCD","Clean","Hazard", "Hazard", "Clean", "Clean","Hazard"),
weight = c(1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
shadow = c(TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
smooth = rep(TRUE, 16),
color = c("#4c4c4c",  "#b2b2b2", "#4c4c4c","#7f7f7f","#7f7f7f","#7f7f7f","#b2b2b2","#4c4c4c","#7f7f7f","#4c4c4c","#7f7f7f","#b2b2b2", "#b2b2b2", "#4c4c4c","#7f7f7f", "#b2b2b2"),
width = c(
  WeeklyAnglers[CleanYN == 1, .N]/WeeklyAnglers[, .N], # Origin to clean
  WeeklyAnglers[CleanYN == 0, .N]/WeeklyAnglers[, .N], # Origin to don't clean
  WeeklyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/WeeklyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    WeeklyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/WeeklyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    WeeklyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/WeeklyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    WeeklyAnglers[CleanYN == 0 & DryYN == 1, .N]/WeeklyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    WeeklyAnglers[CleanYN == 0 & DryYN == 0, .N]/WeeklyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/WeeklyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    WeeklyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/WeeklyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/WeeklyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    WeeklyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/WeeklyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/WeeklyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    WeeklyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/WeeklyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/WeeklyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    WeeklyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/WeeklyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    WeeklyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/WeeklyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 8,
label = format(round(c(
  WeeklyAnglers[CleanYN == 1, .N]/WeeklyAnglers[, .N], # Origin to clean
  WeeklyAnglers[CleanYN == 0, .N]/WeeklyAnglers[, .N], # Origin to don't clean
  WeeklyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/WeeklyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    WeeklyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/WeeklyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    WeeklyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/WeeklyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    WeeklyAnglers[CleanYN == 0 & DryYN == 1, .N]/WeeklyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    WeeklyAnglers[CleanYN == 0 & DryYN == 0, .N]/WeeklyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/WeeklyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    WeeklyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/WeeklyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/WeeklyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    WeeklyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/WeeklyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/WeeklyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    WeeklyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/WeeklyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    WeeklyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/WeeklyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    WeeklyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/WeeklyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    WeeklyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/WeeklyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 100, digits = 1), nsmall = 1),
font.size = rep(12,16),
font.align = c("middle", "middle","middle","bottom","middle","bottom","middle","middle","middle","middle","middle","middle","middle","middle","middle","middle"),
stringsAsFactors = FALSE
)

WeeklyAngCleanVisNetwork <- visNetwork(nodes = WeeklyAnglersVerticesDF,
           edges = WeeklyAnglersEdgesDF,
           height = "800px", width = "600px") %>%
  visIgraphLayout(layout = "layout_with_sugiyama")%>% 
  visExport(type = "png", name = "WeeklyAnglersBiosecurityNetwork", 
   float = "left", label = "Save network", background = "#fff", style= "")


#### Monthly Anglers ####
MonthlyAnglers <- AnglingData[NewAnglingFreq == 2, ]
MonthlyAnglersVerticesDF <- data.frame(
id = c("N01", "N02", "N03", "N04", "N05", "N06", "N07", "N08"),
level = c(1, 2, 2, 3, 3, 4, 5, 5),
group = c("A", "B", "C", "B", "D", "D", "B", "D"),
shape = c("circle", "dot", "dot", "dot", "dot", "dot", "dot", "dot"),
shadow = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
title = c("Origin", "CCD", "Hazard", "CCD", "Clean", "Clean", "CCD", "Hazard"),
label = c("", "Clean", "Don't Clean", "Hot Water", "Cold Water", "Cleaning Product", "Dry", "Don't Dry"),
size = c(0.25,
              MonthlyAnglers[CleanYN == 1, .N]/MonthlyAnglers[!is.na(CleanYN), .N], 
              MonthlyAnglers[CleanYN == 0, .N]/MonthlyAnglers[!is.na(CleanYN), .N],
              MonthlyAnglers[HotWaterYN == 1, .N]/MonthlyAnglers[!is.na(CleanYN), .N], 
              MonthlyAnglers[ColdWaterYN == 1, .N]/MonthlyAnglers[!is.na(CleanYN), .N],
              MonthlyAnglers[CleaningProdYN == 1, .N]/MonthlyAnglers[!is.na(CleanYN), .N],
              MonthlyAnglers[DryYN == 1, .N]/MonthlyAnglers[!is.na(CleanYN), .N],
              MonthlyAnglers[DryYN == 0, .N]/MonthlyAnglers[!is.na(CleanYN), .N]) * 25,
borderWidth = c(2,2,1,2,1,1,2,1),
font.size = rep(14,8),
font.background = "white",
color.background = c("white", "#4c4c4c", "#e5e5e5", "#4c4c4c", "#7f7f7f", "7f7f7f", "#4c4c4c", "#e5e5e5"),
color.border = c("black", "black", "black", "black", "black", "black", "black", "black"),
color.highlight.background = rep("orange", 8),
color.highlight.border = rep("darkred", 8),
stringsAsFactors = FALSE
)

MonthlyAnglersEdgesDF <- data.frame(
from = c("N01", "N01",  "N02", "N02", "N02", "N03", "N03","N04","N05","N04","N05", "N04","N05", "N06", "N06", "N06"),
to = c("N02", "N03",  "N04", "N05", "N06", "N07", "N08", "N06", "N06", "N07", "N07", "N08", "N08", "N07", "N07", "N08"),
type = c("CCD", "Hazard",  "CCD","Clean","Clean","Clean","Hazard","Clean","Clean","CCD","Clean","Hazard", "Hazard", "Clean", "Clean","Hazard"),
weight = c(1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
shadow = c(TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
smooth = rep(TRUE, 16),
color = c("#4c4c4c",  "#b2b2b2", "#4c4c4c","#7f7f7f","#7f7f7f","#7f7f7f","#b2b2b2","#4c4c4c","#7f7f7f","#4c4c4c","#7f7f7f","#b2b2b2", "#b2b2b2", "#4c4c4c","#7f7f7f", "#b2b2b2"),
width = c(
  MonthlyAnglers[CleanYN == 1, .N]/MonthlyAnglers[, .N], # Origin to clean
  MonthlyAnglers[CleanYN == 0, .N]/MonthlyAnglers[, .N], # Origin to don't clean
  MonthlyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/MonthlyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    MonthlyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/MonthlyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    MonthlyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/MonthlyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    MonthlyAnglers[CleanYN == 0 & DryYN == 1, .N]/MonthlyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    MonthlyAnglers[CleanYN == 0 & DryYN == 0, .N]/MonthlyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/MonthlyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    MonthlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/MonthlyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/MonthlyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    MonthlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/MonthlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/MonthlyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    MonthlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/MonthlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/MonthlyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    MonthlyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/MonthlyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    MonthlyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/MonthlyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 8,
label = format(round(c(
  MonthlyAnglers[CleanYN == 1, .N]/MonthlyAnglers[, .N], # Origin to clean
  MonthlyAnglers[CleanYN == 0, .N]/MonthlyAnglers[, .N], # Origin to don't clean
  MonthlyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/MonthlyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    MonthlyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/MonthlyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    MonthlyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/MonthlyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    MonthlyAnglers[CleanYN == 0 & DryYN == 1, .N]/MonthlyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    MonthlyAnglers[CleanYN == 0 & DryYN == 0, .N]/MonthlyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/MonthlyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    MonthlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/MonthlyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/MonthlyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    MonthlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/MonthlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/MonthlyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    MonthlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/MonthlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    MonthlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/MonthlyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    MonthlyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/MonthlyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    MonthlyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/MonthlyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 100, digits = 1), nsmall = 1),
font.size = rep(12,16),
font.align = c("middle", "middle","middle","bottom","middle","bottom","middle","middle","middle","middle","middle","middle","middle","middle","middle","middle"),
stringsAsFactors = FALSE
)

MonthlyAngCleanVisNetwork <- visNetwork(nodes = MonthlyAnglersVerticesDF,
           edges = MonthlyAnglersEdgesDF,
           height = "800px", width = "600px") %>%
  visIgraphLayout(layout = "layout_with_sugiyama")%>% 
  visExport(type = "png", name = "MonthlyAnglersBiosecurityNetwork", 
   float = "left", label = "Save network", background = "#fff", style= "")


#### Quarterly Anglers ####
QuarterlyAnglers <- AnglingData[NewAnglingFreq == 3, ]
QuarterlyAnglersVerticesDF <- data.frame(
id = c("N01", "N02", "N03", "N04", "N05", "N06", "N07", "N08"),
level = c(1, 2, 2, 3, 3, 4, 5, 5),
group = c("A", "B", "C", "B", "D", "D", "B", "D"),
shape = c("circle", "dot", "dot", "dot", "dot", "dot", "dot", "dot"),
shadow = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
title = c("Origin", "CCD", "Hazard", "CCD", "Clean", "Clean", "CCD", "Hazard"),
label = c("", "Clean", "Don't Clean", "Hot Water", "Cold Water", "Cleaning Product", "Dry", "Don't Dry"),
size = c(0.25,
              QuarterlyAnglers[CleanYN == 1, .N]/QuarterlyAnglers[!is.na(CleanYN), .N], 
              QuarterlyAnglers[CleanYN == 0, .N]/QuarterlyAnglers[!is.na(CleanYN), .N],
              QuarterlyAnglers[HotWaterYN == 1, .N]/QuarterlyAnglers[!is.na(CleanYN), .N], 
              QuarterlyAnglers[ColdWaterYN == 1, .N]/QuarterlyAnglers[!is.na(CleanYN), .N],
              QuarterlyAnglers[CleaningProdYN == 1, .N]/QuarterlyAnglers[!is.na(CleanYN), .N],
              QuarterlyAnglers[DryYN == 1, .N]/QuarterlyAnglers[!is.na(CleanYN), .N],
              QuarterlyAnglers[DryYN == 0, .N]/QuarterlyAnglers[!is.na(CleanYN), .N]) * 25,
borderWidth = c(2,2,1,2,1,1,2,1),
font.size = rep(14,8),
font.background = "white",
color.background = c("white", "#4c4c4c", "#e5e5e5", "#4c4c4c", "#7f7f7f", "7f7f7f", "#4c4c4c", "#e5e5e5"),
color.border = c("black", "black", "black", "black", "black", "black", "black", "black"),
color.highlight.background = rep("orange", 8),
color.highlight.border = rep("darkred", 8),
stringsAsFactors = FALSE
)

QuarterlyAnglersEdgesDF <- data.frame(
from = c("N01", "N01",  "N02", "N02", "N02", "N03", "N03","N04","N05","N04","N05", "N04","N05", "N06", "N06", "N06"),
to = c("N02", "N03",  "N04", "N05", "N06", "N07", "N08", "N06", "N06", "N07", "N07", "N08", "N08", "N07", "N07", "N08"),
type = c("CCD", "Hazard",  "CCD","Clean","Clean","Clean","Hazard","Clean","Clean","CCD","Clean","Hazard", "Hazard", "Clean", "Clean","Hazard"),
weight = c(1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
shadow = c(TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
smooth = rep(TRUE, 16),
color = c("#4c4c4c",  "#b2b2b2", "#4c4c4c","#7f7f7f","#7f7f7f","#7f7f7f","#b2b2b2","#4c4c4c","#7f7f7f","#4c4c4c","#7f7f7f","#b2b2b2", "#b2b2b2", "#4c4c4c","#7f7f7f", "#b2b2b2"),
width = c(
  QuarterlyAnglers[CleanYN == 1, .N]/QuarterlyAnglers[, .N], # Origin to clean
  QuarterlyAnglers[CleanYN == 0, .N]/QuarterlyAnglers[, .N], # Origin to don't clean
  QuarterlyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/QuarterlyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    QuarterlyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/QuarterlyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    QuarterlyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/QuarterlyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    QuarterlyAnglers[CleanYN == 0 & DryYN == 1, .N]/QuarterlyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    QuarterlyAnglers[CleanYN == 0 & DryYN == 0, .N]/QuarterlyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/QuarterlyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    QuarterlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/QuarterlyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/QuarterlyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    QuarterlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/QuarterlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/QuarterlyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    QuarterlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/QuarterlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/QuarterlyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    QuarterlyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/QuarterlyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    QuarterlyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/QuarterlyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 8,
label = format(round(c(
  QuarterlyAnglers[CleanYN == 1, .N]/QuarterlyAnglers[, .N], # Origin to clean
  QuarterlyAnglers[CleanYN == 0, .N]/QuarterlyAnglers[, .N], # Origin to don't clean
  QuarterlyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/QuarterlyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    QuarterlyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/QuarterlyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    QuarterlyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/QuarterlyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    QuarterlyAnglers[CleanYN == 0 & DryYN == 1, .N]/QuarterlyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    QuarterlyAnglers[CleanYN == 0 & DryYN == 0, .N]/QuarterlyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/QuarterlyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    QuarterlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/QuarterlyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/QuarterlyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    QuarterlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/QuarterlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/QuarterlyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    QuarterlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/QuarterlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    QuarterlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/QuarterlyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    QuarterlyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/QuarterlyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    QuarterlyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/QuarterlyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 100, digits = 1), nsmall = 1),
font.size = rep(12,16),
font.align = c("middle", "middle","middle","bottom","middle","bottom","middle","middle","middle","middle","middle","middle","middle","middle","middle","middle"),
stringsAsFactors = FALSE
)

QuarterlyAngCleanVisNetwork <- visNetwork(nodes = QuarterlyAnglersVerticesDF,
           edges = QuarterlyAnglersEdgesDF,
           height = "800px", width = "600px") %>%
  visIgraphLayout(layout = "layout_with_sugiyama")%>% 
  visExport(type = "png", name = "QuarterlyAnglersBiosecurityNetwork", 
   float = "left", label = "Save network", background = "#fff", style= "")


#### Yearly Anglers ####
YearlyAnglers <- AnglingData[NewAnglingFreq == 4, ]
YearlyAnglersVerticesDF <- data.frame(
id = c("N01", "N02", "N03", "N04", "N05", "N06", "N07", "N08"),
level = c(1, 2, 2, 3, 3, 4, 5, 5),
group = c("A", "B", "C", "B", "D", "D", "B", "D"),
shape = c("circle", "dot", "dot", "dot", "dot", "dot", "dot", "dot"),
shadow = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
title = c("Origin", "CCD", "Hazard", "CCD", "Clean", "Clean", "CCD", "Hazard"),
label = c("", "Clean", "Don't Clean", "Hot Water", "Cold Water", "Cleaning Product", "Dry", "Don't Dry"),
size = c(0.25,
              YearlyAnglers[CleanYN == 1, .N]/YearlyAnglers[!is.na(CleanYN), .N], 
              YearlyAnglers[CleanYN == 0, .N]/YearlyAnglers[!is.na(CleanYN), .N],
              YearlyAnglers[HotWaterYN == 1, .N]/YearlyAnglers[!is.na(CleanYN), .N], 
              YearlyAnglers[ColdWaterYN == 1, .N]/YearlyAnglers[!is.na(CleanYN), .N],
              YearlyAnglers[CleaningProdYN == 1, .N]/YearlyAnglers[!is.na(CleanYN), .N],
              YearlyAnglers[DryYN == 1, .N]/YearlyAnglers[!is.na(CleanYN), .N],
              YearlyAnglers[DryYN == 0, .N]/YearlyAnglers[!is.na(CleanYN), .N]) * 25,
borderWidth = c(2,2,1,2,1,1,2,1),
font.size = rep(14,8),
font.background = "white",
color.background = c("white", "#4c4c4c", "#e5e5e5", "#4c4c4c", "#7f7f7f", "7f7f7f", "#4c4c4c", "#e5e5e5"),
color.border = c("black", "black", "black", "black", "black", "black", "black", "black"),
color.highlight.background = rep("orange", 8),
color.highlight.border = rep("darkred", 8),
stringsAsFactors = FALSE
)

YearlyAnglersEdgesDF <- data.frame(
from = c("N01", "N01",  "N02", "N02", "N02", "N03", "N03","N04","N05","N04","N05", "N04","N05", "N06", "N06", "N06"),
to = c("N02", "N03",  "N04", "N05", "N06", "N07", "N08", "N06", "N06", "N07", "N07", "N08", "N08", "N07", "N07", "N08"),
type = c("CCD", "Hazard",  "CCD","Clean","Clean","Clean","Hazard","Clean","Clean","CCD","Clean","Hazard", "Hazard", "Clean", "Clean","Hazard"),
weight = c(1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
shadow = c(TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
smooth = rep(TRUE, 16),
color = c("#4c4c4c",  "#b2b2b2", "#4c4c4c","#7f7f7f","#7f7f7f","#7f7f7f","#b2b2b2","#4c4c4c","#7f7f7f","#4c4c4c","#7f7f7f","#b2b2b2", "#b2b2b2", "#4c4c4c","#7f7f7f", "#b2b2b2"),
width = c(
  YearlyAnglers[CleanYN == 1, .N]/YearlyAnglers[, .N], # Origin to clean
  YearlyAnglers[CleanYN == 0, .N]/YearlyAnglers[, .N], # Origin to don't clean
  YearlyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/YearlyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    YearlyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/YearlyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    YearlyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/YearlyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    YearlyAnglers[CleanYN == 0 & DryYN == 1, .N]/YearlyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    YearlyAnglers[CleanYN == 0 & DryYN == 0, .N]/YearlyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/YearlyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    YearlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/YearlyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/YearlyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    YearlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/YearlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/YearlyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    YearlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/YearlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/YearlyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    YearlyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/YearlyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    YearlyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/YearlyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 8,
label = format(round(c(
  YearlyAnglers[CleanYN == 1, .N]/YearlyAnglers[, .N], # Origin to clean
  YearlyAnglers[CleanYN == 0, .N]/YearlyAnglers[, .N], # Origin to don't clean
  YearlyAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/YearlyAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    YearlyAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/YearlyAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    YearlyAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/YearlyAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    YearlyAnglers[CleanYN == 0 & DryYN == 1, .N]/YearlyAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    YearlyAnglers[CleanYN == 0 & DryYN == 0, .N]/YearlyAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/YearlyAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    YearlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/YearlyAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/YearlyAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    YearlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/YearlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/YearlyAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    YearlyAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/YearlyAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    YearlyAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/YearlyAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    YearlyAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/YearlyAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    YearlyAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/YearlyAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 100, digits = 1), nsmall = 1),
font.size = rep(12,16),
font.align = c("middle", "middle","middle","bottom","middle","bottom","middle","middle","middle","middle","middle","middle","middle","middle","middle","middle"),
stringsAsFactors = FALSE
)

YearlyAngCleanVisNetwork <- visNetwork(nodes = YearlyAnglersVerticesDF,
           edges = YearlyAnglersEdgesDF,
           height = "800px", width = "600px") %>%
  visIgraphLayout(layout = "layout_with_sugiyama")%>% 
  visExport(type = "png", name = "YearlyAnglersBiosecurityNetwork", 
   float = "left", label = "Save network", background = "#fff", style= "")

#### NoWaterEntry Anglers ####
NoWaterEntryAnglers <- AnglingData[WaterEntry == 0, ]
NoWaterEntryAnglersVerticesDF <- data.frame(
id = c("N01", "N02", "N03", "N04", "N05", "N06", "N07", "N08"),
level = c(1, 2, 2, 3, 3, 4, 5, 5),
group = c("A", "B", "C", "B", "D", "D", "B", "D"),
shape = c("circle", "dot", "dot", "dot", "dot", "dot", "dot", "dot"),
shadow = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
title = c("Origin", "CCD", "Hazard", "CCD", "Clean", "Clean", "CCD", "Hazard"),
label = c("", "Clean", "Don't Clean", "Hot Water", "Cold Water", "Cleaning Product", "Dry", "Don't Dry"),
size = c(0.25,
              NoWaterEntryAnglers[CleanYN == 1, .N]/NoWaterEntryAnglers[!is.na(CleanYN), .N], 
              NoWaterEntryAnglers[CleanYN == 0, .N]/NoWaterEntryAnglers[!is.na(CleanYN), .N],
              NoWaterEntryAnglers[HotWaterYN == 1, .N]/NoWaterEntryAnglers[!is.na(CleanYN), .N], 
              NoWaterEntryAnglers[ColdWaterYN == 1, .N]/NoWaterEntryAnglers[!is.na(CleanYN), .N],
              NoWaterEntryAnglers[CleaningProdYN == 1, .N]/NoWaterEntryAnglers[!is.na(CleanYN), .N],
              NoWaterEntryAnglers[DryYN == 1, .N]/NoWaterEntryAnglers[!is.na(CleanYN), .N],
              NoWaterEntryAnglers[DryYN == 0, .N]/NoWaterEntryAnglers[!is.na(CleanYN), .N]) * 25,
borderWidth = c(2,2,1,2,1,1,2,1),
font.size = rep(14,8),
font.background = "white",
color.background = c("white", "#4c4c4c", "#e5e5e5", "#4c4c4c", "#7f7f7f", "7f7f7f", "#4c4c4c", "#e5e5e5"),
color.border = c("black", "black", "black", "black", "black", "black", "black", "black"),
color.highlight.background = rep("orange", 8),
color.highlight.border = rep("darkred", 8),
stringsAsFactors = FALSE
)

NoWaterEntryAnglersEdgesDF <- data.frame(
from = c("N01", "N01",  "N02", "N02", "N02", "N03", "N03","N04","N05","N04","N05", "N04","N05", "N06", "N06", "N06"),
to = c("N02", "N03",  "N04", "N05", "N06", "N07", "N08", "N06", "N06", "N07", "N07", "N08", "N08", "N07", "N07", "N08"),
type = c("CCD", "Hazard",  "CCD","Clean","Clean","Clean","Hazard","Clean","Clean","CCD","Clean","Hazard", "Hazard", "Clean", "Clean","Hazard"),
weight = c(1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
shadow = c(TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
smooth = rep(TRUE, 16),
color = c("#4c4c4c",  "#b2b2b2", "#4c4c4c","#7f7f7f","#7f7f7f","#7f7f7f","#b2b2b2","#4c4c4c","#7f7f7f","#4c4c4c","#7f7f7f","#b2b2b2", "#b2b2b2", "#4c4c4c","#7f7f7f", "#b2b2b2"),
width = c(
  NoWaterEntryAnglers[CleanYN == 1, .N]/NoWaterEntryAnglers[, .N], # Origin to clean
  NoWaterEntryAnglers[CleanYN == 0, .N]/NoWaterEntryAnglers[, .N], # Origin to don't clean
  NoWaterEntryAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    NoWaterEntryAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    NoWaterEntryAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    NoWaterEntryAnglers[CleanYN == 0 & DryYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    NoWaterEntryAnglers[CleanYN == 0 & DryYN == 0, .N]/NoWaterEntryAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/NoWaterEntryAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    NoWaterEntryAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/NoWaterEntryAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/NoWaterEntryAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    NoWaterEntryAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/NoWaterEntryAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/NoWaterEntryAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    NoWaterEntryAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/NoWaterEntryAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/NoWaterEntryAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    NoWaterEntryAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/NoWaterEntryAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    NoWaterEntryAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/NoWaterEntryAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 8,
label = format(round(c(
  NoWaterEntryAnglers[CleanYN == 1, .N]/NoWaterEntryAnglers[, .N], # Origin to clean
  NoWaterEntryAnglers[CleanYN == 0, .N]/NoWaterEntryAnglers[, .N], # Origin to don't clean
  NoWaterEntryAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    NoWaterEntryAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    NoWaterEntryAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    NoWaterEntryAnglers[CleanYN == 0 & DryYN == 1, .N]/NoWaterEntryAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    NoWaterEntryAnglers[CleanYN == 0 & DryYN == 0, .N]/NoWaterEntryAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/NoWaterEntryAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    NoWaterEntryAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/NoWaterEntryAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/NoWaterEntryAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    NoWaterEntryAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/NoWaterEntryAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/NoWaterEntryAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    NoWaterEntryAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/NoWaterEntryAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    NoWaterEntryAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/NoWaterEntryAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    NoWaterEntryAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/NoWaterEntryAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    NoWaterEntryAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/NoWaterEntryAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 100, digits = 1),nsmall = 1),
font.size = rep(12,16),
font.align = c("middle", "middle","middle","bottom","middle","bottom","middle","middle","middle","middle","middle","middle","middle","middle","middle","middle"),
stringsAsFactors = FALSE
)

NoWaterEntryAngCleanVisNetwork <- visNetwork(nodes = NoWaterEntryAnglersVerticesDF,
           edges = NoWaterEntryAnglersEdgesDF,
           height = "800px", width = "600px") %>%
  visIgraphLayout(layout = "layout_with_sugiyama")%>% 
  visExport(type = "png", name = "NoWaterEntryAnglersBiosecurityNetwork", 
   float = "left", label = "Save network", background = "#fff", style= "")
#### Abroad Anglers ####
AbroadAnglers <- AnglingData[FishingAbroadYN == TRUE, ]
AbroadAnglersVerticesDF <- data.frame(
id = c("N01", "N02", "N03", "N04", "N05", "N06", "N07", "N08"),
level = c(1, 2, 2, 3, 3, 4, 5, 5),
group = c("A", "B", "C", "B", "D", "D", "B", "D"),
shape = c("circle", "dot", "dot", "dot", "dot", "dot", "dot", "dot"),
shadow = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),
title = c("Origin", "CCD", "Hazard", "CCD", "Clean", "Clean", "CCD", "Hazard"),
label = c("", "Clean", "Don't Clean", "Hot Water", "Cold Water", "Cleaning Product", "Dry", "Don't Dry"),
size = c(0.25,
              AbroadAnglers[CleanYN == 1, .N]/AbroadAnglers[!is.na(CleanYN), .N], 
              AbroadAnglers[CleanYN == 0, .N]/AbroadAnglers[!is.na(CleanYN), .N],
              AbroadAnglers[HotWaterYN == 1, .N]/AbroadAnglers[!is.na(CleanYN), .N], 
              AbroadAnglers[ColdWaterYN == 1, .N]/AbroadAnglers[!is.na(CleanYN), .N],
              AbroadAnglers[CleaningProdYN == 1, .N]/AbroadAnglers[!is.na(CleanYN), .N],
              AbroadAnglers[DryYN == 1, .N]/AbroadAnglers[!is.na(CleanYN), .N],
              AbroadAnglers[DryYN == 0, .N]/AbroadAnglers[!is.na(CleanYN), .N]) * 25,
borderWidth = c(2,2,1,2,1,1,2,1),
font.size = rep(14,8),
font.background = "white",
color.background = c("white", "#4c4c4c", "#e5e5e5", "#4c4c4c", "#7f7f7f", "7f7f7f", "#4c4c4c", "#e5e5e5"),
color.border = c("black", "black", "black", "black", "black", "black", "black", "black"),
color.highlight.background = rep("orange", 8),
color.highlight.border = rep("darkred", 8),
stringsAsFactors = FALSE
)

AbroadAnglersEdgesDF <- data.frame(
from = c("N01", "N01",  "N02", "N02", "N02", "N03", "N03","N04","N05","N04","N05", "N04","N05", "N06", "N06", "N06"),
to = c("N02", "N03",  "N04", "N05", "N06", "N07", "N08", "N06", "N06", "N07", "N07", "N08", "N08", "N07", "N07", "N08"),
type = c("CCD", "Hazard",  "CCD","Clean","Clean","Clean","Hazard","Clean","Clean","CCD","Clean","Hazard", "Hazard", "Clean", "Clean","Hazard"),
weight = c(1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
shadow = c(TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
smooth = rep(TRUE, 16),
color = c("#4c4c4c",  "#b2b2b2", "#4c4c4c","#7f7f7f","#7f7f7f","#7f7f7f","#b2b2b2","#4c4c4c","#7f7f7f","#4c4c4c","#7f7f7f","#b2b2b2", "#b2b2b2", "#4c4c4c","#7f7f7f", "#b2b2b2"),
width = c(
  AbroadAnglers[CleanYN == 1, .N]/AbroadAnglers[, .N], # Origin to clean
  AbroadAnglers[CleanYN == 0, .N]/AbroadAnglers[, .N], # Origin to don't clean
  AbroadAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/AbroadAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    AbroadAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/AbroadAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    AbroadAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/AbroadAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    AbroadAnglers[CleanYN == 0 & DryYN == 1, .N]/AbroadAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    AbroadAnglers[CleanYN == 0 & DryYN == 0, .N]/AbroadAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/AbroadAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    AbroadAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/AbroadAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AbroadAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    AbroadAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AbroadAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AbroadAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    AbroadAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AbroadAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AbroadAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    AbroadAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AbroadAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    AbroadAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/AbroadAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 8,
label = format(round(c(
  AbroadAnglers[CleanYN == 1, .N]/AbroadAnglers[, .N], # Origin to clean
  AbroadAnglers[CleanYN == 0, .N]/AbroadAnglers[, .N], # Origin to don't clean
  AbroadAnglers[CleanYN == 1 & HotWaterYN == 1, .N]/AbroadAnglers[CleanYN == 1, .N], # Clean to hot water edge
                    AbroadAnglers[CleanYN == 1 & ColdWaterYN == 1, .N]/AbroadAnglers[CleanYN == 1, .N], # Clean to cold water edge
                    AbroadAnglers[CleanYN == 1 & ColdWaterYN != 1 & HotWaterYN != 1 & CleaningProdYN == 1, .N]/AbroadAnglers[CleanYN == 1, .N], # Clean to cleaning product (no water)
                    AbroadAnglers[CleanYN == 0 & DryYN == 1, .N]/AbroadAnglers[CleanYN == 0, .N], # Don't clean but dry kit
                    AbroadAnglers[CleanYN == 0 & DryYN == 0, .N]/AbroadAnglers[CleanYN == 0, .N], # Don't clean and do not dry kit
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 1, .N]/AbroadAnglers[HotWaterYN == 1, .N], # Use hot water & Cleaning product
                    AbroadAnglers[ColdWaterYN == 1 & CleaningProdYN == 1, .N]/AbroadAnglers[ColdWaterYN == 1, .N], # Use cold water & Cleaning product
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AbroadAnglers[HotWaterYN == 1, .N], # Use hot water only & dry kit
                    AbroadAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 1, .N]/AbroadAnglers[ColdWaterYN == 1, .N], # Use cold water only & dry kit
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AbroadAnglers[HotWaterYN == 1, .N], # Use hot water only & don't dry kit
                    AbroadAnglers[ColdWaterYN == 1 & CleaningProdYN == 0 & DryYN == 0, .N]/AbroadAnglers[ColdWaterYN == 1, .N], # Use cold water only & don't dry kit
                    AbroadAnglers[HotWaterYN == 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AbroadAnglers[CleaningProdYN == 1, .N], # Use HW & cleaning product & dry kit
                    AbroadAnglers[HotWaterYN != 1 & CleaningProdYN == 1 & DryYN == 1, .N]/AbroadAnglers[CleaningProdYN == 1, .N], # Don't use HW & cleaning product & dry kit (not part of CCD)
                    AbroadAnglers[CleaningProdYN == 1 & DryYN == 0, .N]/AbroadAnglers[CleaningProdYN == 1, .N] # Use cleaning product & don't dry kit
                    ) * 100, digits = 1), nsmall = 1),
font.size = rep(12,16),
font.align = c("middle", "middle","middle","bottom","middle","bottom","middle","middle","middle","middle","middle","middle","middle","middle","middle","middle"),
stringsAsFactors = FALSE
)

AbroadAngCleanVisNetwork <- visNetwork(nodes = AbroadAnglersVerticesDF,
           edges = AbroadAnglersEdgesDF,
           height = "800px", width = "600px") %>%
  visIgraphLayout(layout = "layout_with_sugiyama")%>% 
  visExport(type = "png", name = "AbroadAnglersBiosecurityNetwork", 
   float = "left", label = "Save network", background = "#fff", style= "")

Network diagrams were created showing the percentage of anglers that proceeded through biosecurity processes after fishing. This may be affected by the number of times the anglers goes fishing and so this was done for all anglers, and then for anglers that fish once or more a week, once or more a month but less than once a week, once or more a quarter but less than once a month, and finally less than every 3 months.

Note that the percentage is the percentage of anglers that did the preceding action that then performing the following action. This may not sum to 100% as null responses are present in the survey data.

3.1.1 All Anglers

3.1.2 Anglers fishing once or more a week

3.1.3 Anglers fishing once or more a month but less than once a week

3.1.4 Anglers fishing once or more a quarter but less than once a month

3.1.5 Anglers fishing less than once a quarter

3.1.6 Anglers that have not entered the water

3.1.7 Anglers that go abroad fishing

Section 3.1 Using linear regression to understand factors associated with cleaning and/or drying kit

Section 3.2.1 GLM Analysis of factors that affect if an angler cleans kit or not

Here we set up a Generalised Linear Model to understand if any of the following factors affect whether an angler cleans their kit or not. Factors considered were:

  1. The number of times the angler fished (frequency)
  2. Whether they entered the water or not
  3. The number of pieces of equipment they used.

The data was run through a GLM using a binomial link function and additive effects (no mixed effects).

A summary of the model is:

########################################################
# Output the summary table
########################################################
# Output the model
library(jtools)
summ(CleaningFactorsGLM_FullModel)
Observations 2826 (704 missing obs. deleted)
Dependent variable CleanYN
Type Generalized linear model
Family binomial
Link logit
χ²(5) 30.95
Pseudo-R² (Cragg-Uhler) 0.02
Pseudo-R² (McFadden) 0.02
AIC 1780.33
BIC 1816.01
Est. S.E. z val. p
(Intercept) 1.51 0.15 10.24 0.00
Equip_Number 0.21 0.05 4.47 0.00
NewAnglingFreq.L -0.42 0.19 -2.27 0.02
NewAnglingFreq.Q -0.08 0.17 -0.44 0.66
NewAnglingFreq.C 0.13 0.16 0.81 0.42
WaterEntryTRUE -0.12 0.13 -0.91 0.36
Standard errors: MLE

To understand the model the quantile residuals were plotted which show a smooth, normally distributed curve.

########################################################
# Check the GLM with residuals and prediction outcomes
########################################################
# Check out the model by plotting residuals
# Because we have a discrete response variable will use quantile residuals (Dunn and Gordon (2018))
library(statmod)
plot(density(qresid(CleaningFactorsGLM_FullModel)))

In addition, the predictions made by the model were plotted.

########################################################
# Check the GLM prediction outcomes
########################################################
# Plot predictions using the model for the parameters
library(jtools)
# effect_plot(CleaningFactorsGLM_FullModel, pred = "AgeGroup", interval = TRUE, partial.residuals = TRUE, jitter = 0.2, y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)", cat.geom = "line")
effect_plot(CleaningFactorsGLM_FullModel, pred = "NewAnglingFreq", interval = TRUE, 
            partial.residuals = TRUE, jitter = 0.2, y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "How often do they go fishing",
            pred.labels = c("Weekly", "Monthly", "Quarterly", "Yearly"),cat.geom = "line")

effect_plot(CleaningFactorsGLM_FullModel, pred = "WaterEntry", interval = TRUE, plot.points = TRUE, 
            jitter = 0.2,
            y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "Does the angler enter the water?",cat.geom = "line")

effect_plot(CleaningFactorsGLM_FullModel, pred = "Equip_Number", interval = TRUE,  
            y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "Number of Pieces of Equipment")

# effect_plot(CleaningFactorsGLM_FullModel, pred = "AngMostOften", interval = TRUE, 
#             y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
#             x.label = "Type of Angling", cat.geom = "line")

3.2.1 Summary

The glm model suggests that the age group of the angler, whether they go into the water or not, and/or the type of angling they do most often is not a significant determining factor as to whether they clean their kit or not.

However, the number of pieces of equipment the angler has is a significant factor and the most kit they have the more likely they are to clean their kit after fishing. In addition, the more often they go fishing the more likely the are to clean their kit.

The probability of an angler with 2 pieces of kit cleaning and drying the kit after fishing is around 0.87 and this rises to 0.98 for 10 pieces of equipment.

The model is significantly improved when just using the angling frequency and number of pieces of equipment as predictors = see summary below.

########################################################
# Output the summary table
########################################################
# Output the model
library(jtools)
summ(CleaningFactorsGLM_FullModel2)
Observations 2831 (699 missing obs. deleted)
Dependent variable CleanYN
Type Generalized linear model
Family binomial
Link logit
χ²(4) 30.78
Pseudo-R² (Cragg-Uhler) 0.02
Pseudo-R² (McFadden) 0.02
AIC 1783.99
BIC 1813.73
Est. S.E. z val. p
(Intercept) 1.48 0.15 10.17 0.00
NewAnglingFreq.L -0.40 0.19 -2.18 0.03
NewAnglingFreq.Q -0.08 0.17 -0.49 0.63
NewAnglingFreq.C 0.13 0.16 0.81 0.42
Equip_Number 0.21 0.05 4.46 0.00
Standard errors: MLE
plot(density(qresid(CleaningFactorsGLM_FullModel2)))

effect_plot(CleaningFactorsGLM_FullModel2, pred = "NewAnglingFreq", interval = TRUE, 
            plot.points = TRUE, jitter = 0.2, y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "How often do they go fishing",
            pred.labels = c("Weekly", "Monthly", "Quarterly", "Yearly"),cat.geom = "line")

effect_plot(CleaningFactorsGLM_FullModel2, pred = "Equip_Number", interval = TRUE, 
            y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "Number of Pieces of Equipment")

##############################################
# Plot the raw data
##############################################
GMModelRaw_Equip <- plot_ly(data = CleaningFactorsDF, type = 'box') %>%
  add_trace(x = ~CleanYN,
            y = ~Equip_Number,
            boxpoints = 'all', jitter = 0.3, pointpos = 0) %>%
  layout(showlegend = FALSE,
         xaxis = list(title = "Does the angler clean their kit?", showline = TRUE),
         yaxis = list(title = "Number of Pieces of Equipment", showline = TRUE))
########################################################################
# In this section the GLM is used to predict the log odds of cleaning and
# drying kit 
##########################################################################
library(jtools)
library(data.table)
library(plotly)
PredictFULLModel <- make_predictions(
  CleaningFactorsGLM_FullModel,
  pred = "NewAnglingFreq",
  pred.values = c("1","2","3","4"),
  at = list(Equip_Number = c(2,3,4,5,6,7,8,9,10,11,12,13,14,15))
)

PredictFULLModel <- setDT(PredictFULLModel)

PredictFULLModelPlot <- plot_ly(data = PredictFULLModel, type = "scatter", mode = "lines+markers") %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines",
            line = list(width = 0),
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines",
            line = list(color = 'rgb(50,50,50)', width = 1),
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'circle'),
            name = "At least once a week") %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 2,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'diamond'),
            name = "Once a month") %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 3,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'square'),
            name = "Once a quarter") %>%
  add_trace(data = PredictFULLModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'star'),
            name = "Once a year") %>%
  
  layout(
    legend = list(x = 0.82, xref = 'paper', 
                       y = 0.55, yref = 'paper',
                       bgcolor = 'rgb(240,240,240)',
                       borderwidth = 0, bordercolor = 'rgb(80,80,80)',
                  traceorder = 'normal'),  
    xaxis = list(title = "Pieces of Equipment", range = c(1.95,15.05), 
                      showline = TRUE, showgrid = FALSE,
                  tickmode = 'array', tickvals = seq(2,15,1), ticktext = as.character(seq(2,15,1))),
         yaxis = list(title = "Probability of Cleaning Equipment", range = c(0.7, 1) , 
                      showline = TRUE, showgrid = FALSE),
         annotations = list(text = paste0(
           "<b>Model Coefficients</b><br>Intercept: ", round(coef(CleaningFactorsGLM_FullModel)[1], digits = 2), 
           "<br>Pieces of Equipment: ", round(coef(CleaningFactorsGLM_FullModel)[2], digits = 2),
           "<br>Frequency of Angling: ", round(coef(CleaningFactorsGLM_FullModel)[3], digits = 2), 
           "<br>Entering the water: ", round(coef(CleaningFactorsGLM_FullModel)[6], digits = 2),
           "<br>Model AIC: ", round(CleaningFactorsGLM_FullModel$aic, digits = 0)),
                           x = 0.82, xref = 'paper', xanchor = 'left',
                           y = 0.05, yref = 'paper',
                           showarrow = FALSE, bgcolor = 'rgb(240,240,240)')
         
         )
########################################################################
# In this section the GLM is used to predict the log odds of cleaning and
# drying kit 
##########################################################################
library(jtools)
library(data.table)
library(plotly)
PredictSIGModel <- make_predictions(
  CleaningFactorsGLM_FullModel2,
  pred = "NewAnglingFreq",
  pred.values = c("1","2","3","4"),
  at = list(Equip_Number = c(2,3,4,5,6,7,8,9,10,11,12,13,14,15))
)

PredictSIGModel <- setDT(PredictSIGModel)

PredictSIGModelPlot <- plot_ly(data = PredictSIGModel, type = "scatter", mode = "lines+markers") %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines",
            line = list(width = 0),
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines",
            line = list(color = 'rgb(50,50,50)', width = 1),
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'circle'),
            name = "At least once a week") %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 2,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'diamond'),
            name = "Once a month") %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 3,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'square'),
            name = "Once a quarter") %>%
  add_trace(data = PredictSIGModel[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'star'),
            name = "Once a year") %>%
  
  layout(
    legend = list(x = 0.82, xref = 'paper', 
                       y = 0.55, yref = 'paper',
                       bgcolor = 'rgb(240,240,240)',
                       borderwidth = 0, bordercolor = 'rgb(80,80,80)',
                  traceorder = 'normal'),  
    xaxis = list(title = "Pieces of Equipment", range = c(1.95,15.05), 
                      showline = TRUE, showgrid = FALSE,
                  tickmode = 'array', tickvals = seq(2,15,1), ticktext = as.character(seq(2,15,1))),
         yaxis = list(title = "Probability of Cleaning Equipment", range = c(0.7, 1) , 
                      showline = TRUE, showgrid = FALSE),
         annotations = list(text = paste0("<b>Model Coefficients</b><br>Intercept: ", round(coef(CleaningFactorsGLM_FullModel2)[1], digits = 2), "<br>Frequency of Angling: ", round(coef(CleaningFactorsGLM_FullModel2)[2], digits = 2), "<br>Pieces of Equipment: ", round(coef(CleaningFactorsGLM_FullModel2)[5], digits = 2), "<br>Model AIC: ", round(CleaningFactorsGLM_FullModel2$aic, digits = 0)),
                           x = 0.82, xref = 'paper', xanchor = 'left',
                           y = 0.05, yref = 'paper',
                           showarrow = FALSE, bgcolor = 'rgb(240,240,240)')
         
         )

Section 3.2.1 Using the GLM to predict the probability of cleaning kit

In this part of the analysis the GLM is used to predict the odds of an angler cleaning their kit based on the frequency of angling performed and the number of pieces of equipment they have.

Here for the full model:

Here for the model with just the significant factors:

[1] “############################################################################################ In this section we set up a binomial logistic regression model to look at the factors# associated with cleaning kit with hot water and drying# Response Variable = Cleaning & Drying of kit (CleanDryYN)# Factors = Number of bits of kit# Frequency of Angling# Do they enter the water or not?# What is the type of angling they do the most?# ”

Section 3.2.2 GLM Analysis of factors that affect if an angler cleans and dries kit or not

Here we set up a Generalised Linear Model to understand if any of the following factors affect whether an angler cleans and dries the kit or not. Factors considered were:

  1. The number of times the angler fished (frequency)
  2. Whether they entered the water or not
  3. The number of pieces of equipment they used.

The data was run through a GLM using a binomial link function and additive effects (no mixed effects).

A summary of the model is:

########################################################
# Output the summary table
########################################################
# Output the model
library(jtools)
summ(CleaningFactors_CCD_GLM_FullModel)
Observations 2650 (880 missing obs. deleted)
Dependent variable CleanDryYN
Type Generalized linear model
Family binomial
Link logit
χ²(5) 47.92
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.03
AIC 1872.63
BIC 1907.92
Est. S.E. z val. p
(Intercept) 1.13 0.14 8.04 0.00
Equip_Number 0.25 0.05 5.40 0.00
NewAnglingFreq.L -0.41 0.18 -2.28 0.02
NewAnglingFreq.Q 0.00 0.17 0.00 1.00
NewAnglingFreq.C 0.16 0.15 1.05 0.29
WaterEntryTRUE 0.05 0.13 0.35 0.73
Standard errors: MLE

Model with just the equipment number and angling frequency:

########################################################
# Output the summary table
########################################################
# Output the model
library(jtools)
summ(CleaningFactors_CCD_GLM_FullModel2)
Observations 2655 (875 missing obs. deleted)
Dependent variable CleanDryYN
Type Generalized linear model
Family binomial
Link logit
χ²(4) 48.55
Pseudo-R² (Cragg-Uhler) 0.04
Pseudo-R² (McFadden) 0.03
AIC 1875.29
BIC 1904.71
Est. S.E. z val. p
(Intercept) 1.13 0.14 8.08 0.00
NewAnglingFreq.L -0.41 0.18 -2.28 0.02
NewAnglingFreq.Q -0.00 0.16 -0.01 0.99
NewAnglingFreq.C 0.16 0.15 1.07 0.28
Equip_Number 0.25 0.04 5.69 0.00
Standard errors: MLE

To understand the model the quantile residuals were plotted which show a smooth, normally distributed curve. Here the full model:

########################################################
# Check the GLM with residuals and prediction outcomes
########################################################
# Check out the model by plotting residuals
# Because we have a discrete response variable will use quantile residuals (Dunn and Gordon (2018))
library(statmod)
plot(density(qresid(CleaningFactors_CCD_GLM_FullModel)))

To understand the model the quantile residuals were plotted which show a smooth, normally distributed curve. Here the partial model:

########################################################
# Check the GLM with residuals and prediction outcomes
########################################################
# Check out the model by plotting residuals
# Because we have a discrete response variable will use quantile residuals (Dunn and Gordon (2018))
library(statmod)
plot(density(qresid(CleaningFactors_CCD_GLM_FullModel2)))

Here is a summary and plot of the FULL model:

########################################################
# Output the summary table
########################################################
# Output the model
library(jtools)
summ(CleaningFactors_CCD_GLM_FullModel)
Observations 2650 (880 missing obs. deleted)
Dependent variable CleanDryYN
Type Generalized linear model
Family binomial
Link logit
χ²(5) 47.92
Pseudo-R² (Cragg-Uhler) 0.03
Pseudo-R² (McFadden) 0.03
AIC 1872.63
BIC 1907.92
Est. S.E. z val. p
(Intercept) 1.13 0.14 8.04 0.00
Equip_Number 0.25 0.05 5.40 0.00
NewAnglingFreq.L -0.41 0.18 -2.28 0.02
NewAnglingFreq.Q 0.00 0.17 0.00 1.00
NewAnglingFreq.C 0.16 0.15 1.05 0.29
WaterEntryTRUE 0.05 0.13 0.35 0.73
Standard errors: MLE
plot(density(qresid(CleaningFactors_CCD_GLM_FullModel)))

effect_plot(CleaningFactors_CCD_GLM_FullModel2, pred = "NewAnglingFreq", interval = TRUE, 
            plot.points = TRUE, jitter = 0.2, y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "How often do they go fishing",
            pred.labels = c("Weekly", "Monthly", "Quarterly", "Yearly"),cat.geom = "line")

effect_plot(CleaningFactors_CCD_GLM_FullModel, pred = "Equip_Number", interval = TRUE, 
            y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "Number of Pieces of Equipment")

effect_plot(CleaningFactors_CCD_GLM_FullModel, pred = "WaterEntry", interval = TRUE, plot.points = TRUE, 
            jitter = 0.2,
            y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "Does the angler enter the water?",cat.geom = "line")

##############################################
# Plot the raw data
##############################################
GMModelRaw_Equip <- plot_ly(data = CleaningFactorsDF_CCD, type = 'box') %>%
  add_trace(x = ~CleanDryYN,
            y = ~Equip_Number,
            boxpoints = 'all', jitter = 0.3, pointpos = 0) %>%
  layout(showlegend = FALSE,
         xaxis = list(title = "Does the angler clean & dry their kit?", showline = TRUE),
         yaxis = list(title = "Number of Pieces of Equipment", showline = TRUE))

And here the significant model:

########################################################
# Output the summary table
########################################################
# Output the model
library(jtools)
summ(CleaningFactors_CCD_GLM_FullModel2)
Observations 2655 (875 missing obs. deleted)
Dependent variable CleanDryYN
Type Generalized linear model
Family binomial
Link logit
χ²(4) 48.55
Pseudo-R² (Cragg-Uhler) 0.04
Pseudo-R² (McFadden) 0.03
AIC 1875.29
BIC 1904.71
Est. S.E. z val. p
(Intercept) 1.13 0.14 8.08 0.00
NewAnglingFreq.L -0.41 0.18 -2.28 0.02
NewAnglingFreq.Q -0.00 0.16 -0.01 0.99
NewAnglingFreq.C 0.16 0.15 1.07 0.28
Equip_Number 0.25 0.04 5.69 0.00
Standard errors: MLE
plot(density(qresid(CleaningFactors_CCD_GLM_FullModel2)))

effect_plot(CleaningFactors_CCD_GLM_FullModel2, pred = "NewAnglingFreq", interval = TRUE, 
            plot.points = TRUE, jitter = 0.2, y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "How often do they go fishing",
            pred.labels = c("Weekly", "Monthly", "Quarterly", "Yearly"),cat.geom = "line")

effect_plot(CleaningFactors_CCD_GLM_FullModel2, pred = "Equip_Number", interval = TRUE, 
            y.label = "Cleaning and Drying Kit (0 - No; 1 - Yes)",
            x.label = "Number of Pieces of Equipment")

##############################################
# Plot the raw data
##############################################
GMModelRaw_Equip <- plot_ly(data = CleaningFactorsDF_CCD, type = 'box') %>%
  add_trace(x = ~CleanDryYN,
            y = ~Equip_Number,
            boxpoints = 'all', jitter = 0.3, pointpos = 0) %>%
  layout(showlegend = FALSE,
         xaxis = list(title = "Does the angler clean & dry their kit?", showline = TRUE),
         yaxis = list(title = "Number of Pieces of Equipment", showline = TRUE))

3.2.2 Summary

The glm model suggests that the age group of the angler, whether they go into the water or not, and/or the type of angling they do most often is not a significant determining factor as to whether they clean their kit or not.

However, the number of pieces of equipment the angler has is a significant factor and the most kit they have the more likely they are to clean their kit after fishing. In addition, the more often they go fishing the more likely the are to clean their kit.

The model is significantly improved when just using the angling frequency and number of pieces of equipment as predictors = see summary below.

########################################################################
# In this section the GLM is used to predict the log odds of cleaning and
# drying kit 
##########################################################################
library(jtools)
library(data.table)
library(plotly)
PredictFULLModel_CCD <- make_predictions(
  CleaningFactors_CCD_GLM_FullModel,
  pred = "NewAnglingFreq",
  pred.values = c("1","2","3","4"),
  at = list(Equip_Number = c(2,3,4,5,6,7,8,9,10,11,12,13,14,15))
)

PredictFULLModel_CCD <- setDT(PredictFULLModel_CCD)

PredictFULLModelPlot_CCD <- plot_ly(data = PredictFULLModel_CCD, type = "scatter", mode = "lines+markers") %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(width = 0),
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            cliponaxis = FALSE,
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(color = 'rgb(50,50,50)', width = 1),
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            cliponaxis = FALSE,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            cliponaxis = FALSE,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'circle'),
            name = "At least once a week") %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 2,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            cliponaxis = FALSE,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'diamond'),
            name = "Once a month") %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 3,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            cliponaxis = FALSE,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'square'),
            name = "Once a quarter") %>%
  add_trace(data = PredictFULLModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            cliponaxis = FALSE,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'star'),
            name = "Once a year") %>%
  
  layout(
    legend = list(x = 0.68, xref = 'paper', 
                       y = 0.55, yref = 'paper',
                       bgcolor = 'rgb(240,240,240)',
                       borderwidth = 0, bordercolor = 'rgb(80,80,80)',
                  traceorder = 'normal'),  
    xaxis = list(title = "Pieces of Equipment", range = c(2,15), 
                      showline = TRUE, showgrid = FALSE,
                  tickmode = 'array', tickvals = seq(2,15,1), ticktext = as.character(seq(2,15,1))),
         yaxis = list(title = "Probability of Cleaning and Drying Equipment", range = c(0.7, 1) , 
                      showline = TRUE, showgrid = FALSE),
         annotations = list(text = paste0(
           "<b>Model Coefficients</b><br>Intercept: ", round(coef(CleaningFactors_CCD_GLM_FullModel)[1], digits = 2), "<sup><b>**</b></sup>", 
           "<br>Pieces of Equipment: ", round(coef(CleaningFactors_CCD_GLM_FullModel)[2], digits = 2), "<sup><b>**</b></sup>",
           "<br>Frequency of Angling: ", round(coef(CleaningFactors_CCD_GLM_FullModel)[3], digits = 2), "<sup><b>**</b></sup>",
           "<br>Entering the water: ", round(coef(CleaningFactors_CCD_GLM_FullModel)[6], digits = 2), 
           "<br>Model AIC: ", round(CleaningFactors_CCD_GLM_FullModel$aic, digits = 0)),
                           x = 0.68, xref = 'paper', xanchor = 'left',
                           y = 0.05, yref = 'paper',
                           showarrow = FALSE, bgcolor = 'rgb(240,240,240)')
         
         )

3.2.2 Using the GLM to predict the probability of cleaning kit - FULL MODEL

In this part of the analysis the GLM is used to predict the odds of an angler cleaning and drying their kit based on the frequency of angling performed and the number of pieces of equipment they have.

** This is the full model predictions **

The odds of an angler that goes fishing at least once a week with 10 pieces of kit cleaning and drying the kit after fishing is around 0.979145 and this compares to 0.8368381 for an angler that goes fishing once a quarter with 3 pieces of equipment.

In addition, the predictions made by the model were plotted.

########################################################################
# In this section the GLM is used to predict the log odds of cleaning and
# drying kit 
##########################################################################
library(jtools)
library(data.table)
library(plotly)
PredictSIGModel_CCD <- make_predictions(
  CleaningFactors_CCD_GLM_FullModel2,
  pred = "NewAnglingFreq",
  pred.values = c("1","2","3","4"),
  at = list(Equip_Number = c(2,3,4,5,6,7,8,9,10,11,12,13,14,15))
)

PredictSIGModel_CCD <- setDT(PredictSIGModel_CCD)

PredictSIGModelPlot <- plot_ly(data = PredictSIGModel_CCD, type = "scatter", mode = "lines+markers") %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            mode = "lines",
            line = list(width = 0),
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            mode = "lines",
            line = list(color = 'rgb(50,50,50)', width = 1),
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(width = 0),
            fill = 'tonexty',
            fillcolor = 'rgba(200,200,200,0.5)',
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            fill = 'tonexty',
            fillcolor = 'rgba(240,240,240,0.5)',
            name = "Upper",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(color = 'rgb(120,120,120)', width = 1, dash = 'dot'),
            name = "Lower",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymax,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Upper2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~ymin,
            mode = "lines",
            line = list(color = 'rgb(100,100,100)', width = 1, dash = 'dashdot'),
            name = "Lower2",
            showlegend = FALSE) %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 1,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'circle'),
            name = "At least once a week") %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 2,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'diamond'),
            name = "Once a month") %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 3,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'square'),
            name = "Once a quarter") %>%
  add_trace(data = PredictSIGModel_CCD[NewAnglingFreq == 4,],
            x = ~Equip_Number,
            y = ~CleanDryYN,
            mode = "lines+markers",
            line = list(color = 'rgb(0,0,0)', width = 1),
            marker = list(color = 'rgb(20,20,20)', symbol = 'star'),
            name = "Once a year") %>%
  
  layout(
    legend = list(x = 0.7, xref = 'paper', 
                       y = 0.55, yref = 'paper',
                       bgcolor = 'rgb(240,240,240)',
                       borderwidth = 0, bordercolor = 'rgb(80,80,80)',
                  traceorder = 'normal'),  
    xaxis = list(title = "Pieces of Equipment", range = c(1.95,15.05), 
                      showline = TRUE, showgrid = FALSE,
                  tickmode = 'array', tickvals = seq(2,15,1), ticktext = as.character(seq(2,15,1))),
         yaxis = list(title = "Probability of Cleaning & Drying Equipment", range = c(0.4, 1) , 
                      showline = TRUE, showgrid = FALSE),
         annotations = list(text = paste0("<b>Model Coefficients</b><br><b>Intercept: </b>", round(coef(CleaningFactors_CCD_GLM_FullModel2)[1], digits = 2), "<br><b>Frequency of Angling: </b>", round(coef(CleaningFactors_CCD_GLM_FullModel2)[2], digits = 2), "<br><b>Pieces of Equipment: </b>", round(coef(CleaningFactors_CCD_GLM_FullModel2)[5], digits = 2), "<br><b>Model AIC: </b>", round(CleaningFactors_CCD_GLM_FullModel2$aic, digits = 0)),
                           x = 0.7, xref = 'paper', xanchor = 'left',
                           y = 0.05, yref = 'paper',
                           showarrow = FALSE, bgcolor = 'rgb(240,240,240)')
         
         )

Section 3.2.2 Using the GLM to predict the probability of cleaning and drying kit - SIGNIFICANT MODEL

In this part of the analysis the GLM is used to predict the odds of an angler cleaning and drying their kit based on the frequency of angling performed and the number of pieces of equipment they have. This is only for the significant factors.


Results Section 4 - Understanding of the factors that the anglers consider when cleaning their kit between trips (Likert Data)

In the survey the anglers were asked to rank 5 factors when considering to clean their kit between trips. In the first set of analysis only those rankings that were complete (ie. all 5 factors were given a score after data cleaning) are considered. In total 1496 responses were used.

4.1 Plot of Likert Data

A plot of the Likert data is shown below:

Section 4.2 Statistical Analysis of Likert Data

4.2.1 Statistical analysis

There were 1496 complete rankings in the dataset. The summary statistics of the ranking are:
Parameter Appearance of kit Cost of cleaning Availability of hose/cleaning station Lack of information what to do The time is takes to clean kit
Mean Rank Score 3.54411764705882 2.02339572192513 3.40641711229947 2.90040106951872 3.12566844919786
Median Rank Score 4 2 4 3 3
Number Rank Score - 1 236 610 233 305 112
Number Rank Score - 2 156 474 231 281 354
Number Rank Score - 3 201 228 248 358 461
Number Rank Score - 4 364 135 263 362 372
Number Rank Score - 5 539 49 521 190 197

And looking at the data as box plots shows:

Comparing the rankings using a Kruskal-Wallis test will determine if there is any significant difference between the median values for each grouping (although not which).

Using this test obtains a p-value of 5.6879821^{-232} with an effect size of 0.7199899. An effect size of 0.01-0.06 is considered a small effect; 0.06-0.14 a moderate effect; and > 0.14 a large effect.

4.2.2 Post-hoc analysis

In order to determine statistical differences between the groups, post-hoc analysis was performed using Mann_Whitney tests. An obvious comparison is with the cost. These post-hoc tests need to be corrected for multiple analyses using the Bonferroni correction.

Comparing the groups with the cost group:

X1 X2
Cost of Cleaning versus Time is takes 8.05982233310477e-135
Cost of Cleaning versus lack of information 7.78830520365604e-74
Cost of Cleaning versus availability of hose 4.32387439636803e-136
Cost of Cleaning versus appearance of kit 8.76334516282211e-159
Lack of information versus Time is takes 7.83887147405951e-05
Lack of information versus availability of hose 3.04124432667646e-23
Lack of information versus appearance of kit 8.75662257505316e-39

4.2.3 Simplification of the groups

A concern is that the previous tests compare the position within the rank rather than the importance of the ranking. To check this, the groups were simplified into Unimportant (ranks 1 and 2) and Important (ranks 4 and 5) with rank 3 being neutral and ignored. This should provide an indication of the overall direction of importance.

As a table of counts in each rank we have:

Appearance.of.Kit Cost.of.cleaning Availability.of.a.hose.cleaning.station Information.on.how.to.clean Time.taken.to.clean.kit
Unimportant 392 1084 464 586 466
Important 903 184 784 552 569

Using a chi-squared analysis using the null hypothesis that there will be an equal number of important to unimportant counts, and applying a Bonferroni correction we have:

X1 X2
Cost of Cleaning 3.04521837908025e-140
Lack of information 1
Appearance of kit 4.58559959931584e-45
Time it takes 0.00683333522646535
Availability of hose 6.63005662244777e-19

Overall, the data suggests that:

  1. The cost of cleaning is not an important factor when deciding to clean or not.
  2. The appearance of the kit is an important factor when deciding to clean or not.
  3. Availability of a hose or cleaning station is an important factor when deciding to clean or not.
  4. The time taken to clean the kit is an important factor when deciding to clean or not.
  5. Information about how to clean is neither important or unimportant. Anglers are neutral on this factor.

Results Section 5 - Responses given “What prevents you from cleaning your equipment?”

In this section, the responses to factors that prevent the angler from cleaning and drying kit are examined. This was an open response question and to facilitate answers were condensed into 15 groups - see Table below.

In total there were 1102 responses to this question and of these 835 answers only indicated a simple “no”, “none” or other information free examples. Of the remaining 267 “sensible” responses, 76 suggested the need to clean, the fact that there was no excuse, or the manner in which they cleaned their kit and the remaining 191 responses put forward reasons for not cleaning their kit. These responses were categorised into the groupings shown below. As cleaning to prevent disease spread is not a factor for not cleaning these were not included in the responses.

Reason Number
Limited Space 14
Time 24
Moving Location 20
Disease Spread 12
Weather 32
Kit Condition 8
Facilities 15
Understanding 21
Disability access 8
Motivation 12
Unclean Dip Tanks 4
Chemical Supply 4
No Dip Tank 14
Time between trips 2
Legal requirement 1

Here: “time” = enough time to clean & dry equipment following use “chemical supply” = availability of disinfectant/antibacterial products at facilities “moving location” = cleaning & drying when moving between different rivers etc “Motivation” = knowing it should be done but not bothering to do so “Understanding” = various responses indicating the need for more information or a lack of understanding of the need to clean & dry “Facilities” = lack of facilities available including drying facilities “Disability Access” = unable to access/use facilities due to illness or disability

There were some full responses given and these are given below:

Reason
Time (unable to check ) Cleaning stations unlikely to appear on riverside , dip stations are a good idea but guess cost would outweigh action
My various waders are usually only used at one venue and the months between usage let’s them dry long enough to render any problems dealt with. I will bank fish Grafham over the winter using neoprene waders which will be washed down on site and will not use them again until they go to the spey in. Mid February
No excuse for poor maintenance and contamination issues. Being a bailiff of my local syndicate this is very high on our priority to protect our stock.
If i’ve caught a fish that looks unhealthy or a venue that i suspect has an issue. Especially if foreign species could be there like signal crayfish
I know it’s difficult to write questions that cover every situation and this survey is aimed at non native species. But the primary reason I clean my equipment is to remove salt (if sea fishing) and dirt. I also tend to fish when I do fish inland on just one river so chance of spreading alien species is reduced. I also ensure equipment is dried before stowage. . I probably visit other venues once or twice a year mostly fly. I do occasionaly go carp fishing at local venue and use the on site dipping facilities if I do.
Sloppy use of available facilities by others on site (includes staff) renders effectiveness highly questionable!

#######################################################################
#### Section 3 - Biosecurity performed by anglers ################
#######################################################################
# Section to show the biosecurity performed by anglers
# This will be a table with the CCD, Clean/Dry indicators
#######################################################################
######################################################
#### Build data tables ####
######################################################
# Table for the biosecurity measures taken by anglers
# This data is only for anglers that have a response to CCD, HotWaterYN and DryYN and AgeGroup
AnglingData[, AgeGroup := factor(AgeGroup)]
setorderv(AnglingData, "AgeGroup")
CCD_DataTable <- data.table(
  rbind(
  
    cbind(
        AnglingType = rep("Coarse", 7),
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, CCD_YN)]))[CCD_YN == 1, .(KnowCCD = sum(N)), AgeGroup][, .(KnowCCD)]
        ),
    cbind(
        AnglingType = "Coarse",
        AgeGroups = "Total",
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[CCD_YN == TRUE & Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Game", 7),
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, CCD_YN)]))[CCD_YN == 1, .(KnowCCD = sum(N)), AgeGroup][, .(KnowCCD)]
        ),
    cbind(
        AnglingType = "Game",
        AgeGroups = "Total",
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[CCD_YN == TRUE & Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Sea", 7),
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, CCD_YN)]))[CCD_YN == 1, .(KnowCCD = sum(N)), AgeGroup][, .(KnowCCD)]
        ),
    cbind(
        AnglingType = "Sea",
        AgeGroups = "Total",
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[CCD_YN == TRUE & Sea == 1 & !is.na(AgeGroup), .N]
        ),
    
    cbind(
        AnglingType = rep("Competition", 7),
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, CCD_YN)]))[CCD_YN == 1, .(KnowCCD = sum(N)), AgeGroup][, .(KnowCCD)]
        ),
    cbind(
        AnglingType = "Competition",
        AgeGroups = "Total",
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[CCD_YN == TRUE & Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("All", 7),
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, CCD_YN)]))[CCD_YN == 1, .(KnowCCD = sum(N)), AgeGroup][, .(KnowCCD)]
        ),
    cbind(
        AnglingType = "All",
        AgeGroups = "Total",
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[CCD_YN == TRUE & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        )
    , use.names=FALSE
  ))
  
CCD_DataTable[, KnowCCDPerCent := round(as.numeric(KnowCCD)/as.numeric(Anglers) * 100, digits = 2)]
CCD_DataTable[, KnowCCDOutput := paste0(KnowCCD, "<br>(", KnowCCDPerCent, ")")]

# Build a similar data table for cleaning kit with hot water
HotWater_DataTable <- data.table(
  rbind(
  
    cbind(
        AnglingType = rep("Coarse", 7),
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN)]))[HotWaterYN == 1, .(CleanHW = sum(N)), AgeGroup][, .(CleanHW)]
        ),
    cbind(
        AnglingType = "Coarse",
        AgeGroups = "Total",
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Game", 7),
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN)]))[HotWaterYN == 1, .(CleanHW = sum(N)), AgeGroup][, .(CleanHW)]
        ),
    cbind(
        AnglingType = "Game",
        AgeGroups = "Total",
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Sea", 7),
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN)]))[HotWaterYN == 1, .(CleanHW = sum(N)), AgeGroup][, .(CleanHW)]
        ),
    cbind(
        AnglingType = "Sea",
        AgeGroups = "Total",
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Competition", 7),
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN)]))[HotWaterYN == 1, .(CleanHW = sum(N)), AgeGroup][, .(CleanHW)]
        ),
    cbind(
        AnglingType = "Competition",
        AgeGroups = "Total",
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("All", 7),
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN)]))[HotWaterYN == 1, .(CleanHW = sum(N)), AgeGroup][, .(CleanHW)]
        ),
    cbind(
        AnglingType = "All",
        AgeGroups = "Total",
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        )
    , use.names=FALSE
  ))
  
HotWater_DataTable[, CleanHWPerCent := round(as.numeric(CleanHW)/as.numeric(Anglers) * 100, digits = 2)]
HotWater_DataTable[, CleanHWOutput := paste0(CleanHW, "<br>(", CleanHWPerCent, ")")]
# Build a similar data table for drying kit actively
DryKit_DataTable <- data.table(
  rbind(
  
    cbind(
        AnglingType = rep("Coarse", 7),
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, DryYN)]))[DryYN == 1, .(DryKit = sum(N)), AgeGroup][, .(DryKit)]
        ),
    cbind(
        AnglingType = "Coarse",
        AgeGroups = "Total",
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[DryYN == TRUE & Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Game", 7),
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, DryYN)]))[DryYN == 1, .(DryKit = sum(N)), AgeGroup][, .(DryKit)]
        ),
    cbind(
        AnglingType = "Game",
        AgeGroups = "Total",
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[DryYN == TRUE & Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Sea", 7),
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, DryYN)]))[DryYN == 1, .(DryKit = sum(N)), AgeGroup][, .(DryKit)]
        ),
    cbind(
        AnglingType = "Sea",
        AgeGroups = "Total",
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[DryYN == TRUE & Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Competition", 7),
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, DryYN)]))[DryYN == 1, .(DryKit = sum(N)), AgeGroup][, .(DryKit)]
        ),
    cbind(
        AnglingType = "Competition",
        AgeGroups = "Total",
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[DryYN == TRUE & Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("All", 7),
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, DryYN)]))[DryYN == 1, .(DryKit = sum(N)), AgeGroup][, .(DryKit)]
        ),
    cbind(
        AnglingType = "All",
        AgeGroups = "Total",
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[DryYN == TRUE & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        )
    , use.names=FALSE
  ))
  
DryKit_DataTable[, DryKitPerCent := round(as.numeric(DryKit)/as.numeric(Anglers) * 100, digits = 2)]
DryKit_DataTable[, DryKitOutput := paste0(DryKit, "<br>(", DryKitPerCent, ")")]

# Build a similar data table for anglers performing CCD as per their responses
AnglerCCD_DataTable <- data.table(
  rbind(
  
    cbind(
        AnglingType = rep("Coarse", 7),
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN)]))[HotWaterYN == 1 & DryYN == 1, .(AnglerCCD = sum(N)), AgeGroup][, .(AnglerCCD)]
        ),
    cbind(
        AnglingType = "Coarse",
        AgeGroups = "Total",
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Game", 7),
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN)]))[HotWaterYN == 1 & DryYN == 1, .(AnglerCCD = sum(N)), AgeGroup][, .(AnglerCCD)]
        ),
    cbind(
        AnglingType = "Game",
        AgeGroups = "Total",
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Sea", 7),
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN)]))[HotWaterYN == 1 & DryYN == 1, .(AnglerCCD = sum(N)), AgeGroup][, .(AnglerCCD)]
        ),
    cbind(
        AnglingType = "Sea",
        AgeGroups = "Total",
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Competition", 7),
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN)]))[HotWaterYN == 1 & DryYN == 1, .(AnglerCCD = sum(N)), AgeGroup][, .(AnglerCCD)]
        ),
    cbind(
        AnglingType = "Competition",
        AgeGroups = "Total",
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("All", 7),
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN)]))[HotWaterYN == 1 & DryYN == 1, .(AnglerCCD = sum(N)), AgeGroup][, .(AnglerCCD)]
        ),
    cbind(
        AnglingType = "All",
        AgeGroups = "Total",
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == TRUE & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        )
    , use.names=FALSE
  ))
  
AnglerCCD_DataTable[, AnglerCCDPerCent := round(as.numeric(AnglerCCD)/as.numeric(Anglers) * 100, digits = 2)]

AnglerCCD_DataTable[, AnglerCCDOutput := paste0(AnglerCCD, "<br>(", AnglerCCDPerCent, ")")]

# Build a similar data table for anglers performing CCD as per their responses and do not know about CCD
AnglerCCDNotKnowCCD_DataTable <- data.table(
  rbind(
  
    cbind(
        AnglingType = rep("Coarse", 7),
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 0, .(AnglerCCDNotKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDNotKnowCCD)]
        ),
    cbind(
        AnglingType = "Coarse",
        AgeGroups = "Total",
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1 & Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Game", 7),
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 0, .(AnglerCCDNotKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDNotKnowCCD)]
        ),
    cbind(
        AnglingType = "Game",
        AgeGroups = "Total",
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1 & Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Sea", 7),
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 0, .(AnglerCCDNotKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDNotKnowCCD)]
        ),
    cbind(
        AnglingType = "Sea",
        AgeGroups = "Total",
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1 & Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Competition", 7),
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 0, .(AnglerCCDNotKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDNotKnowCCD)]
        ),
    cbind(
        AnglingType = "Competition",
        AgeGroups = "Total",
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1 & Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("All", 7),
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 0, .(AnglerCCDNotKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDNotKnowCCD)]
        ),
    cbind(
        AnglingType = "All",
        AgeGroups = "Total",
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 0 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        )
    , use.names=FALSE
  ))
  
AnglerCCDNotKnowCCD_DataTable[, AnglerCCDNotKnowCCDPerCent := round(as.numeric(AnglerCCDNotKnowCCD)/as.numeric(Anglers) * 100, digits = 2)]

AnglerCCDNotKnowCCD_DataTable[, AnglerCCDNotKnowCCDOutput := paste0(AnglerCCDNotKnowCCD, "<br>(", AnglerCCDNotKnowCCDPerCent, ")")]

# Build a similar data table for anglers who know about CCD and perform CCD
AnglerCCDKnowCCD_DataTable <- data.table(
  rbind(
  
    cbind(
        AnglingType = rep("Coarse", 7),
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1, .(AnglerCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Coarse",
        AgeGroups = "Total",
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Game", 7),
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1, .(AnglerCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Game",
        AgeGroups = "Total",
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Sea", 7),
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1, .(AnglerCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Sea",
        AgeGroups = "Total",
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Competition", 7),
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1, .(AnglerCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Competition",
        AgeGroups = "Total",
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("All", 7),
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1, .(AnglerCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "All",
        AgeGroups = "Total",
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[HotWaterYN == 1 & DryYN == 1 & CCD_YN == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        )
    , use.names=FALSE
  ))
  
AnglerCCDKnowCCD_DataTable[, AnglerCCDKnowCCDPerCent := round(as.numeric(AnglerCCDKnowCCD)/as.numeric(Anglers) * 100, digits = 2)]

AnglerCCDKnowCCD_DataTable[, AnglerCCDKnowCDDOutput := paste0(AnglerCCDKnowCCD, "<br>(", AnglerCCDKnowCCDPerCent, ")")]

# Build a similar data table for anglers who know about CCD but do not perform ccd
AnglerNoCCDKnowCCD_DataTable <- data.table(
  rbind(
  
    cbind(
        AnglingType = rep("Coarse", 7),
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1, .(AnglerNoCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerNoCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Coarse",
        AgeGroups = "Total",
        AnglingData[Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Coarse == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Game", 7),
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1, .(AnglerNoCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerNoCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Game",
        AgeGroups = "Total",
        AnglingData[Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Game == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Sea", 7),
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1, .(AnglerNoCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerNoCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Sea",
        AgeGroups = "Total",
        AnglingData[Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Sea == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("Competition", 7),
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1, .(AnglerNoCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerNoCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "Competition",
        AgeGroups = "Total",
        AnglingData[Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & Competition == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        ),
    
    cbind(
        AnglingType = rep("All", 7),
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup), AgeGroup][, .(AgeGroups = AgeGroup)],
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N, AgeGroup][, .(Anglers = N)],
        as.data.table(table(AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .(AgeGroup, HotWaterYN, DryYN, CCD_YN)]))[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1, .(AnglerNoCCDKnowCCD = sum(N)), AgeGroup][, .(AnglerNoCCDKnowCCD)]
        ),
    cbind(
        AnglingType = "All",
        AgeGroups = "Total",
        AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N],
        AnglingData[(HotWaterYN == 0 | DryYN == 0) & CCD_YN == 1 & !is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), .N]
        )
    , use.names=FALSE
  ))
  
AnglerNoCCDKnowCCD_DataTable[, AnglerNoCCDKnowCCDPerCent := round(as.numeric(AnglerNoCCDKnowCCD)/as.numeric(Anglers) * 100, digits = 2)]

AnglerNoCCDKnowCCD_DataTable[, AnglerNoCCDKnowCDDOutput := paste0(AnglerNoCCDKnowCCD, "<br>(", AnglerNoCCDKnowCCDPerCent, ")")]

# Merge the data tables
# Here we want Total Anglers, Anglers that know about CCD, Anglers that perform CCD, Anglers that clean with HW, Anglers that dry kit

# Anglers per group and those that know about ccd
Table2_DataTable <- merge(CCD_DataTable[, .(AnglingType, AgeGroups, Anglers, KnowCCDOutput)], 
                          AnglerCCD_DataTable[, .(AnglingType, AgeGroups, Anglers, AnglerCCDOutput)],
                          by = c("AnglingType", "AgeGroups", "Anglers")) 
# Add the anglers that know about CCD and perform CCD
Table2_DataTable <- merge(Table2_DataTable, AnglerCCDKnowCCD_DataTable[, .(AnglingType, AgeGroups, Anglers, AnglerCCDKnowCDDOutput)],
                          by = c("AnglingType", "AgeGroups", "Anglers"))
# Add the angler that know about CCD but do not do it
Table2_DataTable <- merge(Table2_DataTable, AnglerNoCCDKnowCCD_DataTable[, .(AnglingType, AgeGroups, Anglers, AnglerNoCCDKnowCDDOutput)],
                          by = c("AnglingType", "AgeGroups", "Anglers"))

# Add anglers that perform CCD but do not know about ccd
Table2_DataTable <- merge(Table2_DataTable, AnglerCCDNotKnowCCD_DataTable[, .(AnglingType, AgeGroups, Anglers, AnglerCCDNotKnowCCDOutput)],
                          by = c("AnglingType", "AgeGroups", "Anglers"))


colnames(Table2_DataTable) <- c("Type of Angling", "Age Group", "Total", 
                               "Know about CCD", "Perform CCD",
                               "Know about CCD and Perform CCD", "Know about CCD but not Perform CCD", "Perform CCD but do not know about CCD")
# Make this into a nice table to present
library(kableExtra)
Table2_HTMLTable <- kbl(Table2_DataTable[, .(`Type of Angling`, `Age Group`, Total, `Know about CCD`, `Perform CCD`, `Know about CCD and Perform CCD`, `Know about CCD but not Perform CCD`, `Perform CCD but do not know about CCD`)], escape = FALSE) %>%
  kable_paper(full_width = FALSE) %>%
  add_header_above(c(" ", " ",  "Number of Anglers (Percentage)" = 6)) %>%
  add_indent(c(1:7, 9:15, 17:23, 25:31, 33:39)) %>%
  row_spec(c(8,16, 24, 32, 40), bold = T, align = 'center') %>%
  row_spec(c(1:7, 9:15, 17:23, 25:31, 33:39), align = 'center') %>%
  pack_rows("All Types", 1,8, label_row_css = "background-color: #666; color: #fff;") %>%
  pack_rows("Coarse", 9,16, label_row_css = "background-color: #666; color: #fff;") %>%
  pack_rows("Competition", 17,24, label_row_css = "background-color: #666; color: #fff;") %>%
  pack_rows("Game", 25,32, label_row_css = "background-color: #666; color: #fff;") %>%
  pack_rows("Sea", 33,40, label_row_css = "background-color: #666; color: #fff;")

Results Section 6 - Biosecurity and Check, Clean, Dry Campaign Message

Of all respondents, just less than one fifth (19.88%) had heard of the CCD and this was 25.75% of those that responded to the question “Have you heard of the Check, Clean Dry campaign in the UK?”.

Section 6.1 Is knowledge of CCD different for the different types of angler?

We wanted to understand whether different types of angler (coarse, sea, game or competition) knew about CCD more or less than other types. As some anglers perform more than 1 type of angling to check whether there are differences in the knowledge of CCD and the type of angler a binomial test was performed for each angling type against the population as a whole. The probability of success is the probability an angler chosen at random knows about CCD and in effect we are asking “does this group of anglers perform differently compared to the population as a whole”. Or, if I select an angler at random from all anglers are they more or less likely to know about CCD than if I select from just coarse, sea, game or competition anglers.

###################################################################################
# Check for significant differences between knowledge of CCD for the anglers for a
# type of angling and the anglers as a whole
###################################################################################

# The hypothesised probability of success is the probability an angler knows about CCD
pCCD <- AnglingData[CCD_YN == 1, .N]/AnglingData[!is.na(CCD_YN), .N]

# Run the binomial tests for coarse, game, sea and competition
pCoarse_CCD <- binom.test(AnglingData[CCD_YN == 1 & Coarse == 1, .N],
                          AnglingData[!is.na(CCD_YN) & Coarse == 1, .N],
                          pCCD,
                          alternative = 'two.sided',
                          conf.level = 0.95)
pGame_CCD <- binom.test(AnglingData[CCD_YN == 1 & Game == 1, .N],
                        AnglingData[!is.na(CCD_YN) & Game == 1, .N],
                        pCCD,
                        alternative = 'two.sided',
                        conf.level = 0.95)
pSea_CCD <- binom.test(AnglingData[CCD_YN == 1 & Sea == 1, .N],
                        AnglingData[!is.na(CCD_YN) & Sea == 1, .N],
                        pCCD,
                        alternative = 'two.sided',
                        conf.level = 0.95)
pCompetition_CCD <- binom.test(AnglingData[CCD_YN == 1 & Competition == 1, .N],
                        AnglingData[!is.na(CCD_YN) & Competition == 1, .N],
                        pCCD,
                        alternative = 'two.sided',
                        conf.level = 0.95)

# Create a table for output
CCD_TestTableDF <- data.frame(rbind(
  c("All", AnglingData[CCD_YN == 1, .N], AnglingData[!is.na(CCD_YN), .N], round(pCCD, digits = 3), "", "", "-"),
  c("Coarse", pCoarse_CCD$statistic, pCoarse_CCD$parameter, round(pCoarse_CCD$estimate, digits = 3), round(pCoarse_CCD$conf.int[1], digits = 3), round(pCoarse_CCD$conf.int[2], digits = 3), round(pCoarse_CCD$p.value, digits = 3)),
  c("Game", pGame_CCD$statistic, pGame_CCD$parameter, round(pGame_CCD$estimate, digits = 3), round(pGame_CCD$conf.int[1], digits = 3), round(pGame_CCD$conf.int[2], digits = 3), round(pGame_CCD$p.value, digits = 3)),
  c("Sea", pSea_CCD$statistic, pSea_CCD$parameter, round(pSea_CCD$estimate, digits = 3), round(pSea_CCD$conf.int[1], digits = 3), round(pSea_CCD$conf.int[2], digits = 3), round(pSea_CCD$p.value, digits = 3)),
  c("Competition", pCompetition_CCD$statistic, pCompetition_CCD$parameter, round(pCompetition_CCD$estimate, digits = 3), round(pCompetition_CCD$conf.int[1], digits = 3), round(pCompetition_CCD$conf.int[2], digits = 3), round(pCompetition_CCD$p.value, digits = 3))
))
colnames(CCD_TestTableDF) <- c("Type of Angling", "Know CCD", "Total", "Estimate pCCD", "Lower Conf Int", "Upper Conf Int", "pValue")

CCD_TestTable <- kbl(CCD_TestTableDF) %>%
  kable_paper(full_width = FALSE)

# The hypothesised probability of success is the probability an angler knows about CCD
pCCD2 <- AnglingData[CCD_YN == 1 & Coarse == 1, .N]/AnglingData[!is.na(CCD_YN) & Coarse == 1, .N]

# Run the binomial tests for coarse, game, sea and competition
pGame_CCD2 <- binom.test(AnglingData[CCD_YN == 1 & Game == 1, .N],
                        AnglingData[!is.na(CCD_YN) & Game == 1, .N],
                        pCCD2,
                        alternative = 'two.sided',
                        conf.level = 0.95)
pSea_CCD2 <- binom.test(AnglingData[CCD_YN == 1 & Sea == 1, .N],
                        AnglingData[!is.na(CCD_YN) & Sea == 1, .N],
                        pCCD2,
                        alternative = 'two.sided',
                        conf.level = 0.95)
pCompetition_CCD2 <- binom.test(AnglingData[CCD_YN == 1 & Competition == 1, .N],
                        AnglingData[!is.na(CCD_YN) & Competition == 1, .N],
                        pCCD2,
                        alternative = 'two.sided',
                        conf.level = 0.95)

# Create a table for output
CCD_TestTableDF2 <- data.frame(rbind(
  c("Coarse", pCoarse_CCD$statistic, pCoarse_CCD$parameter, round(pCCD2, digits = 3), round(pCoarse_CCD$conf.int[1], digits = 3), round(pCoarse_CCD$conf.int[2], digits = 3), 1),
  c("Game", pGame_CCD2$statistic, pGame_CCD2$parameter, round(pGame_CCD2$estimate, digits = 3), round(pGame_CCD2$conf.int[1], digits = 3), round(pGame_CCD2$conf.int[2], digits = 3), round(pGame_CCD2$p.value, digits = 3)),
  c("Sea", pSea_CCD2$statistic, pSea_CCD2$parameter, round(pSea_CCD2$estimate, digits = 3), round(pSea_CCD2$conf.int[1], digits = 3), round(pSea_CCD2$conf.int[2], digits = 3), round(pSea_CCD2$p.value, digits = 3)),
  c("Competition", pCompetition_CCD2$statistic, pCompetition_CCD2$parameter, round(pCompetition_CCD2$estimate, digits = 3), round(pCompetition_CCD2$conf.int[1], digits = 3), round(pCompetition_CCD2$conf.int[2], digits = 3), round(pCompetition_CCD2$p.value, digits = 3))
))
colnames(CCD_TestTableDF2) <- c("Type of Angling", "Know CCD", "Total", "Estimate pCCD", "Lower Conf Int", "Upper Conf Int", "pValue")

CCD_TestTable2 <- kbl(CCD_TestTableDF2) %>%
  kable_paper(full_width = FALSE)

# The hypothesised probability of success is the probability an angler knows about CCD
pCCD3 <- AnglingData[CCD_YN == 1 & Coarse == 1 & Game == 0 & Sea == 0 & Competition == 0, .N]/AnglingData[!is.na(CCD_YN) & Coarse == 1 & Game == 0 & Sea == 0 & Competition == 0, .N]

# Run the binomial tests for coarse, game, sea and competition
pGame_CCD3 <- binom.test(AnglingData[CCD_YN == 1 & Game == 1 & Coarse == 0, .N],
                        AnglingData[!is.na(CCD_YN) & Game == 1 & Coarse == 0, .N],
                        pCCD3,
                        alternative = 'two.sided',
                        conf.level = 0.95)
pSea_CCD3 <- binom.test(AnglingData[CCD_YN == 1 & Sea == 1 & Coarse == 0, .N],
                        AnglingData[!is.na(CCD_YN) & Sea == 1 & Coarse == 0, .N],
                        pCCD3,
                        alternative = 'two.sided',
                        conf.level = 0.95)
pCompetition_CCD3 <- binom.test(AnglingData[CCD_YN == 1 & Competition == 1 & Coarse == 0, .N],
                        AnglingData[!is.na(CCD_YN) & Competition == 1 & Coarse == 0, .N],
                        pCCD3,
                        alternative = 'two.sided',
                        conf.level = 0.95)

# Create a table for output
CCD_TestTableDF3 <- data.frame(rbind(
  c("Coarse", AnglingData[CCD_YN == 1 & Coarse == 1 & Game == 0 & Sea == 0 & Competition == 0, .N], AnglingData[!is.na(CCD_YN) & Coarse == 1 & Game == 0 & Sea == 0 & Competition == 0, .N], round(pCCD3, digits = 3), "", "", 1),
  c("Game", pGame_CCD3$statistic, pGame_CCD3$parameter, round(pGame_CCD3$estimate, digits = 3), round(pGame_CCD3$conf.int[1], digits = 3), round(pGame_CCD3$conf.int[2], digits = 3), round(pGame_CCD3$p.value, digits = 3)),
  c("Sea", pSea_CCD3$statistic, pSea_CCD3$parameter, round(pSea_CCD3$estimate, digits = 3), round(pSea_CCD3$conf.int[1], digits = 3), round(pSea_CCD3$conf.int[2], digits = 3), round(pSea_CCD3$p.value, digits = 3)),
  c("Competition", pCompetition_CCD3$statistic, pCompetition_CCD3$parameter, round(pCompetition_CCD3$estimate, digits = 3), round(pCompetition_CCD3$conf.int[1], digits = 3), round(pCompetition_CCD3$conf.int[2], digits = 3), round(pCompetition_CCD3$p.value, digits = 3))
))
colnames(CCD_TestTableDF3) <- c("Type of Angling", "Know CCD", "Total", "Estimate pCCD", "Lower Conf Int", "Upper Conf Int", "pValue")

CCD_TestTable3 <- kbl(CCD_TestTableDF3) %>%
  kable_paper(full_width = FALSE)

Here is a table of results using a binomial exact test (non-parametric test) using the population as a whole.

Type of Angling Know CCD Total Estimate pCCD Lower Conf Int Upper Conf Int pValue
All 704 2734 0.257
Coarse 603 2394 0.252 0.235 0.27 0.543
Game 242 731 0.331 0.297 0.366 0
Sea 163 488 0.334 0.292 0.378 0
Competition 77 247 0.312 0.255 0.374 0.058

This shows that there are differences between the angling groups with coarse anglers more representative of the population as a whole which is expected as they form the larger share of anglers. However, the game and sea anglers have a significantly higher proportion of anglers that are aware of CCD compared to the other groups.

Using coarse anglers as the test group a similar set of results are obtained.

Type of Angling Know CCD Total Estimate pCCD Lower Conf Int Upper Conf Int pValue
Coarse 603 2394 0.252 0.235 0.27 1
Game 242 731 0.331 0.297 0.366 0
Sea 163 488 0.334 0.292 0.378 0
Competition 77 247 0.312 0.255 0.374 0.033

If we removed those anglers that overlap between the groups we get:

Type of Angling Know CCD Total Estimate pCCD Lower Conf Int Upper Conf Int pValue
Coarse 326 1554 0.21 1
Game 89 301 0.296 0.245 0.351 0
Sea 22 65 0.338 0.226 0.466 0.014
Competition 6 29 0.207 0.08 0.397 1

Section 3.2 Relationships between performing CCD and knowing about CCD in the angling groups.

Looking at only those anglers that gave a response to their age group, whether they know about CCD, and whether they clean their kit with hot water and whether they dry their kit (complete responses) we can look at the number of anglers and their relationship with CCD and biosecurity. This is shown in the table below:

Number of Anglers (Percentage)
Type of Angling Age Group Total Know about CCD Perform CCD Know about CCD and Perform CCD Know about CCD but not Perform CCD Perform CCD but do not know about CCD
All Types
All 17 years and under 25 4
(16)
13
(52)
3
(12)
1
(4)
10
(40)
All 18 - 24 years 29 10
(34.48)
15
(51.72)
6
(20.69)
4
(13.79)
9
(31.03)
All 25 - 34 years 136 41
(30.15)
79
(58.09)
24
(17.65)
17
(12.5)
55
(40.44)
All 35 - 44 years 259 72
(27.8)
139
(53.67)
41
(15.83)
31
(11.97)
98
(37.84)
All 45 - 54 years 439 120
(27.33)
217
(49.43)
55
(12.53)
65
(14.81)
162
(36.9)
All 55 - 64 years 760 199
(26.18)
367
(48.29)
94
(12.37)
105
(13.82)
273
(35.92)
All 65 + years 957 242
(25.29)
424
(44.31)
111
(11.6)
131
(13.69)
313
(32.71)
All Total 2605 688
(26.41)
1272
(48.83)
334
(12.82)
354
(13.59)
920
(35.32)
Coarse
Coarse 17 years and under 22 4
(18.18)
12
(54.55)
3
(13.64)
1
(4.55)
9
(40.91)
Coarse 18 - 24 years 29 10
(34.48)
15
(51.72)
6
(20.69)
4
(13.79)
9
(31.03)
Coarse 25 - 34 years 130 38
(29.23)
76
(58.46)
23
(17.69)
15
(11.54)
53
(40.77)
Coarse 35 - 44 years 249 71
(28.51)
131
(52.61)
40
(16.06)
31
(12.45)
91
(36.55)
Coarse 45 - 54 years 398 103
(25.88)
198
(49.75)
48
(12.06)
55
(13.82)
150
(37.69)
Coarse 55 - 64 years 663 168
(25.34)
321
(48.42)
77
(11.61)
91
(13.73)
244
(36.8)
Coarse 65 + years 803 195
(24.28)
354
(44.08)
88
(10.96)
107
(13.33)
266
(33.13)
Coarse Total 2294 589
(25.68)
1124
(49)
304
(13.25)
304
(13.25)
285
(12.42)
Competition
Competition 17 years and under 3 0
(0)
0
(0)
0
(0)
0
(0)
0
(0)
Competition 18 - 24 years 2 1
(50)
1
(50)
0
(0)
1
(50)
1
(50)
Competition 25 - 34 years 5 1
(20)
4
(80)
1
(20)
0
(0)
3
(60)
Competition 35 - 44 years 27 6
(22.22)
12
(44.44)
4
(14.81)
2
(7.41)
8
(29.63)
Competition 45 - 54 years 35 13
(37.14)
20
(57.14)
4
(11.43)
9
(25.71)
16
(45.71)
Competition 55 - 64 years 82 27
(32.93)
46
(56.1)
13
(15.85)
14
(17.07)
33
(40.24)
Competition 65 + years 81 26
(32.1)
35
(43.21)
8
(9.88)
18
(22.22)
27
(33.33)
Competition Total 235 74
(31.49)
119
(50.64)
44
(18.72)
44
(18.72)
30
(12.77)
Game
Game 17 years and under 5 2
(40)
2
(40)
1
(20)
1
(20)
1
(20)
Game 18 - 24 years 4 1
(25)
2
(50)
0
(0)
1
(25)
2
(50)
Game 25 - 34 years 17 10
(58.82)
7
(41.18)
3
(17.65)
7
(41.18)
4
(23.53)
Game 35 - 44 years 50 18
(36)
27
(54)
10
(20)
8
(16)
17
(34)
Game 45 - 54 years 103 39
(37.86)
50
(48.54)
21
(20.39)
18
(17.48)
29
(28.16)
Game 55 - 64 years 220 75
(34.09)
104
(47.27)
33
(15)
42
(19.09)
71
(32.27)
Game 65 + years 282 92
(32.62)
124
(43.97)
40
(14.18)
52
(18.44)
84
(29.79)
Game Total 681 237
(34.8)
319
(46.84)
129
(18.94)
129
(18.94)
108
(15.86)
Sea
Sea 17 years and under 3 1
(33.33)
1
(33.33)
1
(33.33)
0
(0)
0
(0)
Sea 18 - 24 years 7 2
(28.57)
3
(42.86)
2
(28.57)
0
(0)
1
(14.29)
Sea 25 - 34 years 22 8
(36.36)
15
(68.18)
6
(27.27)
2
(9.09)
9
(40.91)
Sea 35 - 44 years 48 19
(39.58)
29
(60.42)
14
(29.17)
5
(10.42)
15
(31.25)
Sea 45 - 54 years 81 30
(37.04)
41
(50.62)
15
(18.52)
15
(18.52)
26
(32.1)
Sea 55 - 64 years 161 52
(32.3)
82
(50.93)
29
(18.01)
23
(14.29)
53
(32.92)
Sea 65 + years 143 47
(32.87)
67
(46.85)
22
(15.38)
25
(17.48)
45
(31.47)
Sea Total 465 162
(34.84)
241
(51.83)
70
(15.05)
70
(15.05)
89
(19.14)

6.1 Polar Bar Plots to show how different factors affect knowledge of CCD and performing CCD.

We can also show this on a polar bar plots.

##################################################################
#### Radar plots of the CCD knowledge ####
##################################################################
RadarData <- AnglingData[!is.na(AgeGroup) & !is.na(HotWaterYN) & !is.na(DryYN) & !is.na(CCD_YN), ]
RadarData <- setDT(RadarData)
library(plotly)

####################################################################
# Generate an overlay plot
####################################################################
symbolList = c("circle-open-dot", "triangle-up", "triangle-down", "triangle-right-open-dot",
               "square-open-dot", "square-open", "square-open-dot")
lineDashList = c("2px", "4px", "6px", "8px", "10px", "12px","14px")
fillColorList = c("rgb(20,20,20)","rgb(50,50,50)","rgb(80,80,80)",
                  "rgb(100,100,100)","rgb(130,130,130)","rgb(160,160,160)","rgb(190,190,190)")
CCDAgeGroupRadarAgeOverlap <- plot_ly(type = 'scatterpolar',
    mode = 'markers+lines')

###################################
# Here as a bar polar plot
##################################
CCDRadarBasicPlot <- plot_ly(type = 'barpolar')
PlotAgeGrps = c(1,2,3, 4, 5, 6, 7)
OffsetBars = seq(2, 58, 8)
fillColorList = c("rgb(20,20,20)","rgb(50,50,50)","rgb(80,80,80)",
                  "rgb(100,100,100)","rgb(130,130,130)","rgb(160,160,160)","rgb(190,190,190)")
LegendNames = c("Under 18", "18-24", "25-34", "25-44", "45-54", "55-65", "Over 65")
# Set up the backgroud segments
CCDRadarBasicPlot <- CCDRadarBasicPlot %>%
      add_trace(
        r = c(70),
        theta = 0,
        thetaunit = "degree",
        base = 0,
        showlegend = FALSE,
        opacity = 0.85,
        width = 60,
        marker = list(color = 'rgb(250,250,250)',
                      line = list(color = "black", width = 1))
      ) %>%
  add_trace(
        r = c(70),
        theta = 120,
        thetaunit = "degree",
        base = 0,
        showlegend = FALSE,
        opacity = 0.85,
        width = 60,
        marker = list(color = 'rgb(250,250,250)',
                      line = list(color = "black", width = 1))
      ) %>%
  add_trace(
        r = c(70),
        theta = 240,
        thetaunit = "degree",
        base = 0,
        showlegend = FALSE,
        opacity = 0.85,
        width = 60,
        marker = list(color = 'rgb(250,250,250)',
                      line = list(color = "black", width = 1))
      ) 

CCDAgeGroupRadarAgeOverlapBAR <- CCDRadarBasicPlot
for (i in  PlotAgeGrps){
  CCDAgeGroupRadarAgeOverlapBAR <-CCDAgeGroupRadarAgeOverlapBAR %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & AgeGroup == AnglingAgeGroups[i], .N]/ RadarData[AgeGroup == AnglingAgeGroups[i],.N] * 100,
              RadarData[CCD_YN == 1 & AgeGroup == AnglingAgeGroups[i] & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[AgeGroup == AnglingAgeGroups[i],.N] * 100,
              RadarData[CCD_YN == 0 & AgeGroup == AnglingAgeGroups[i] & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[AgeGroup == AnglingAgeGroups[i],.N] * 100,
              RadarData[HotWaterYN == 1 & DryYN == 1 & AgeGroup == AnglingAgeGroups[i], .N]/ RadarData[AgeGroup == AnglingAgeGroups[i],.N] * 100,
              RadarData[CCD_YN == 0 & AgeGroup == AnglingAgeGroups[i] & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[AgeGroup == AnglingAgeGroups[i],.N] * 100,
              RadarData[CCD_YN == 1 & AgeGroup == AnglingAgeGroups[i] & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[AgeGroup == AnglingAgeGroups[i],.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[i],
        opacity = 1,
        width = 6.4,
        offset = OffsetBars[i],
          marker = list(symbol = symbolList[i], color = fillColorList[i],size = 10,
                        line = list(dash = lineDashList[i]))
      )
}

CCDAgeGroupRadarAgeOverlapBAR <-CCDAgeGroupRadarAgeOverlapBAR %>%
  layout(
    barmode = 'group',
    showlegend = TRUE,
    legend = list(bordercolor = 'rgb(40,40,40)', borderwidth = 1,
                  font = list(family = "Arial", size = 12),
                  title = list(text = "Age Group (Years)", family = "Arial", size = 14),
                  x = 0.8, xanchor = "left", 
                  y = 0.5, yanchor = "center"),
    polar = list(
      bgcolor = 'white',
      angularaxis = list(showline = FALSE, showgrid = FALSE, tickmode = 'array', ticks = "", rotation = 90,
      ticktext = c('Know About CCD', "Know About CCD<br>& Perform CCD", "Don't know about CCD<br>and Perform CCD", "Perform CCD",
                       "Don't Know About CCD<br>& Don't Perform CCD", "Know About CCD<br>& Don't Perform CCD"),
      tickvals = c(0,60,120,180,240,300)),
      radialaxis = list(
        visible = TRUE,
        angle = 60, tickangle = 45,
        tickmode = 'array', ticktext = c("", "", "20","", "40","", "60"), tickvals = c(0,10,20,30,40,50,60),
        tickfont = list(size = 10),
        range = c(0,70)
      ))
    )

###########################################################
# Here as a bar polar plot = repeated for angling groups
###########################################################
OffsetBars = seq(4, 56, 13)
fillColorList = c("rgb(20,20,20)","rgb(80,80,80)",
                  "rgb(130,130,130)","rgb(190,190,190)")
LegendNames = c("Coarse", "Game", "Sea", "Competition")

CCDAgeGroupRadarTypeOverlapBAR <- CCDRadarBasicPlot
  CCDAgeGroupRadarTypeOverlapBAR <-CCDAgeGroupRadarTypeOverlapBAR %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & Coarse == 1, .N]/ RadarData[Coarse == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Coarse == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Coarse == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Coarse == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Coarse == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & Coarse == 1, .N]/ RadarData[Coarse == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Coarse == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Coarse == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Coarse == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Coarse == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[1],
        opacity = 1,
        width = 11,
        offset = OffsetBars[1],
          marker = list(color = fillColorList[1])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & Game == 1, .N]/ RadarData[Game == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Game == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Game == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Game == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Game == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & Game == 1, .N]/ RadarData[Game == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Game == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Game == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Game == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Game == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[2],
        opacity = 1,
        width = 11,
        offset = OffsetBars[2],
          marker = list(color = fillColorList[2])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & Sea == 1, .N]/ RadarData[Sea == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Sea == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Sea == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Sea == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Sea == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & Sea == 1, .N]/ RadarData[Sea == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Sea == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Sea == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Sea == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Sea == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[3],
        opacity = 1,
        width = 11,
        offset = OffsetBars[3],
          marker = list(color = fillColorList[3])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & Competition == 1, .N]/ RadarData[Competition == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Competition == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Competition == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Competition == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Competition == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & Competition == 1, .N]/ RadarData[Competition == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Competition == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Competition == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Competition == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Competition == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[4],
        opacity = 1,
        width = 11,
        offset = OffsetBars[4],
          marker = list(color = fillColorList[4])
      )

CCDAgeGroupRadarTypeOverlapBAR <-CCDAgeGroupRadarTypeOverlapBAR %>%
  layout(
    barmode = 'group',
    showlegend = TRUE,
    legend = list(bordercolor = 'rgb(40,40,40)', borderwidth = 1,
                  font = list(family = "Arial", size = 12),
                  title = list(text = "Type of Angling", family = "Arial", size = 14),
                  x = 0.8, xanchor = "left", 
                  y = 0.5, yanchor = "center"),
    polar = list(
      bgcolor = 'white',
      angularaxis = list(showline = FALSE, showgrid = FALSE, tickmode = 'array', ticks = "", rotation = 90,
      ticktext = c('Know About CCD', "Know About CCD<br>& Perform CCD", "Don't know about CCD<br>and Perform CCD", "Perform CCD",
                       "Don't Know About CCD<br>& Don't Perform CCD", "Know About CCD<br>& Don't Perform CCD"),
      tickvals = c(0,60,120,180,240,300)),
      radialaxis = list(
        visible = TRUE,
        angle = 60, tickangle = 45,
        tickmode = 'array', ticktext = c("", "", "20","", "40","", "60"), tickvals = c(0,10,20,30,40,50,60),
        tickfont = list(size = 10),
        range = c(0,70)
      ))
    )

############################################################
# Now for angling frequency
############################################################
OffsetBars = seq(5, 55, 10)
fillColorList = c("rgb(20,20,20)","rgb(70,70,70)",
                  "rgb(120,120,120)","rgb(170,170,170)", "rgb(220,220,220)")
LegendNames = c("Once a week or more", "Once every 2 weeks", "Once a month", "Once a quarter", "Less than once a quarter")

CCDAgeGroupRadarAngFreqOverlapBAR <- CCDRadarBasicPlot
  CCDAgeGroupRadarAngFreqOverlapBAR <-CCDAgeGroupRadarAngFreqOverlapBAR %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & (FreqAng == "Once a week" | FreqAng == "More than once a week"), .N]/ RadarData[(FreqAng == "Once a week" | FreqAng == "More than once a week"),.N] * 100,
                RadarData[CCD_YN == 1 & (FreqAng == "Once a week" | FreqAng == "More than once a week") & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[(FreqAng == "Once a week" | FreqAng == "More than once a week"),.N] * 100,
                RadarData[CCD_YN == 0 & (FreqAng == "Once a week" | FreqAng == "More than once a week") & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[(FreqAng == "Once a week" | FreqAng == "More than once a week"),.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & (FreqAng == "Once a week" | FreqAng == "More than once a week"), .N]/ RadarData[(FreqAng == "Once a week" | FreqAng == "More than once a week"),.N] * 100,
                RadarData[CCD_YN == 0 & (FreqAng == "Once a week" | FreqAng == "More than once a week") & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[(FreqAng == "Once a week" | FreqAng == "More than once a week"),.N] * 100,
                RadarData[CCD_YN == 1 & (FreqAng == "Once a week" | FreqAng == "More than once a week") & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[(FreqAng == "Once a week" | FreqAng == "More than once a week"),.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[1],
        opacity = 1,
        width = 8,
        offset = OffsetBars[1],
          marker = list(color = fillColorList[1])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & FreqAng == "Once every 2 weeks", .N]/ RadarData[FreqAng == "Once every 2 weeks",.N] * 100,
                RadarData[CCD_YN == 1 & FreqAng == "Once every 2 weeks" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[FreqAng == "Once every 2 weeks",.N] * 100,
                RadarData[CCD_YN == 0 & FreqAng == "Once every 2 weeks" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[FreqAng == "Once every 2 weeks",.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & FreqAng == "Once every 2 weeks", .N]/ RadarData[FreqAng == "Once every 2 weeks",.N] * 100,
                RadarData[CCD_YN == 0 & FreqAng == "Once every 2 weeks" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[FreqAng == "Once every 2 weeks",.N] * 100,
                RadarData[CCD_YN == 1 & FreqAng == "Once every 2 weeks" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[FreqAng == "Once every 2 weeks",.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[2],
        opacity = 1,
        width = 8,
        offset = OffsetBars[2],
          marker = list(color = fillColorList[2])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & (FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"), .N]/ RadarData[(FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"),.N] * 100,
                RadarData[CCD_YN == 1 & (FreqAng == "Once every month" | FreqAng == "Once every 3 weeks") & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[(FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"),.N] * 100,
                RadarData[CCD_YN == 0 & (FreqAng == "Once every month" | FreqAng == "Once every 3 weeks") & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[(FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"),.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & (FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"), .N]/ RadarData[(FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"),.N] * 100,
                RadarData[CCD_YN == 0 & (FreqAng == "Once every month" | FreqAng == "Once every 3 weeks") & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[(FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"),.N] * 100,
                RadarData[CCD_YN == 1 & (FreqAng == "Once every month" | FreqAng == "Once every 3 weeks") & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[(FreqAng == "Once every month" | FreqAng == "Once every 3 weeks"),.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[3],
        opacity = 1,
        width = 8,
        offset = OffsetBars[3],
          marker = list(color = fillColorList[3])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & (FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"), .N]/ RadarData[(FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"),.N] * 100,
                RadarData[CCD_YN == 1 & (FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months") & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[(FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"),.N] * 100,
                RadarData[CCD_YN == 0 & (FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months") & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[(FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"),.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & (FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"), .N]/ RadarData[(FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"),.N] * 100,
                RadarData[CCD_YN == 0 & (FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months") & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[(FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"),.N] * 100,
                RadarData[CCD_YN == 1 & (FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months") & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[(FreqAng == "Once every 3 months" | FreqAng == "Once every 2 months"),.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[4],
        opacity = 1,
        width = 8,
        offset = OffsetBars[4],
          marker = list(color = fillColorList[4])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & FreqAng == "Less than once every 3 months", .N]/ RadarData[FreqAng == "Less than once every 3 months",.N] * 100,
                RadarData[CCD_YN == 1 & FreqAng == "Less than once every 3 months" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[FreqAng == "Less than once every 3 months",.N] * 100,
                RadarData[CCD_YN == 0 & FreqAng == "Less than once every 3 months" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[FreqAng == "Less than once every 3 months",.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & FreqAng == "Less than once every 3 months", .N]/ RadarData[FreqAng == "Less than once every 3 months",.N] * 100,
                RadarData[CCD_YN == 0 & FreqAng == "Less than once every 3 months" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[FreqAng == "Less than once every 3 months",.N] * 100,
                RadarData[CCD_YN == 1 & FreqAng == "Less than once every 3 months" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[FreqAng == "Less than once every 3 months",.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[5],
        opacity = 1,
        width = 8,
        offset = OffsetBars[5],
          marker = list(color = fillColorList[5])
      )

CCDAgeGroupRadarAngFreqOverlapBAR <-CCDAgeGroupRadarAngFreqOverlapBAR %>%
  layout(
    barmode = 'group',
    showlegend = TRUE,
    legend = list(bordercolor = 'rgb(40,40,40)', borderwidth = 1,
                  font = list(family = "Arial", size = 12),
                  title = list(text = "Frequency of Angling", family = "Arial", size = 14),
                  x = 0.8, xanchor = "left", 
                  y = 0.5, yanchor = "center"),
    polar = list(
      bgcolor = 'white',
      angularaxis = list(showline = FALSE, showgrid = FALSE, tickmode = 'array', ticks = "", rotation = 90,
      ticktext = c('Know About CCD', "Know About CCD<br>& Perform CCD", "Don't know about CCD<br>and Perform CCD", "Perform CCD",
                       "Don't Know About CCD<br>& Don't Perform CCD", "Know About CCD<br>& Don't Perform CCD"),
      tickvals = c(0,60,120,180,240,300)),
      radialaxis = list(
        visible = TRUE,
        angle = 60, tickangle = 45,
        tickmode = 'array', ticktext = c("", "", "20","", "40","", "60"), tickvals = c(0,10,20,30,40,50,60),
        tickfont = list(size = 10),
        range = c(0,70)
      ))
    )

#####################################################################
# Now for background of angler
#####################################################################
OffsetBars = seq(6, 54, 16)
fillColorList = c("rgb(20,20,20)","rgb(100,100,100)",
                  "rgb(180,180,180)")
LegendNames = c("Member of Angling Club", "Knowledge of INNS", "Member of Conservation Group")

CCDAgeGroupRadarOtherOverlapBAR <- CCDRadarBasicPlot
  CCDAgeGroupRadarOtherOverlapBAR <-CCDAgeGroupRadarOtherOverlapBAR %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & AnglingClub_YN == "Yes (please specify)", .N]/ RadarData[AnglingClub_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 1 & AnglingClub_YN == "Yes (please specify)" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[AnglingClub_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 0 & AnglingClub_YN == "Yes (please specify)" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[AnglingClub_YN == "Yes (please specify)",.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & AnglingClub_YN == "Yes (please specify)", .N]/ RadarData[AnglingClub_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 0 & AnglingClub_YN == "Yes (please specify)" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[AnglingClub_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 1 & AnglingClub_YN == "Yes (please specify)" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[AnglingClub_YN == "Yes (please specify)",.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[1],
        opacity = 1,
        width = 14,
        offset = OffsetBars[1],
          marker = list(color = fillColorList[1])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & INNS_YN == 1, .N]/ RadarData[INNS_YN == 1,.N] * 100,
                RadarData[CCD_YN == 1 & INNS_YN == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[INNS_YN == 1,.N] * 100,
                RadarData[CCD_YN == 0 & INNS_YN == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[INNS_YN == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & INNS_YN == 1, .N]/ RadarData[INNS_YN == 1,.N] * 100,
                RadarData[CCD_YN == 0 & INNS_YN == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[INNS_YN == 1,.N] * 100,
                RadarData[CCD_YN == 1 & INNS_YN == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[INNS_YN == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[2],
        opacity = 1,
        width = 14,
        offset = OffsetBars[2],
          marker = list(color = fillColorList[2])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & Conserv_YN == "Yes (please specify)", .N]/ RadarData[Conserv_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 1 & Conserv_YN == "Yes (please specify)" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Conserv_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 0 & Conserv_YN == "Yes (please specify)" & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Conserv_YN == "Yes (please specify)",.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & Conserv_YN == "Yes (please specify)", .N]/ RadarData[Conserv_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 0 & Conserv_YN == "Yes (please specify)" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Conserv_YN == "Yes (please specify)",.N] * 100,
                RadarData[CCD_YN == 1 & Conserv_YN == "Yes (please specify)" & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Conserv_YN == "Yes (please specify)",.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[3],
        opacity = 1,
        width = 14,
        offset = OffsetBars[3],
          marker = list(color = fillColorList[3])
      ) 

CCDAgeGroupRadarOtherOverlapBAR <-CCDAgeGroupRadarOtherOverlapBAR %>%
  layout(
    barmode = 'group',
    showlegend = TRUE,
    legend = list(bordercolor = 'rgb(40,40,40)', borderwidth = 1,
                  font = list(family = "Arial", size = 12),
                  title = list(text = "Other information", family = "Arial", size = 14),
                  x = 0.8, xanchor = "left", 
                  y = 0.5, yanchor = "center"),
    polar = list(
      bgcolor = 'white',
      angularaxis = list(showline = FALSE, showgrid = FALSE, tickmode = 'array', ticks = "", rotation = 90,
      ticktext = c('Know About CCD', "Know About CCD<br>& Perform CCD", "Don't know about CCD<br>and Perform CCD", "Perform CCD",
                       "Don't Know About CCD<br>& Don't Perform CCD", "Know About CCD<br>& Don't Perform CCD"),
      tickvals = c(0,60,120,180,240,300)),
      radialaxis = list(
        visible = TRUE,
        angle = 60, tickangle = 45,
        tickmode = 'array', ticktext = c("", "", "20","", "40","", "60"), tickvals = c(0,10,20,30,40,50,60),
        tickfont = list(size = 10),
        range = c(0,70)
      ))
    )

##############################################################
# Now for angling other infor
###############################################################
###########################################################
# Here as a bar polar plot = repeated for angling groups
###########################################################
OffsetBars = seq(4, 56, 13)
fillColorList = c("rgb(20,20,20)","rgb(80,80,80)",
                  "rgb(130,130,130)","rgb(190,190,190)")
LegendNames = c("Specialist angler", "Angler enters the water", "Angler uses waders", "Angler fishes abroad" )

CCDAgeGroupRadarAnglingOtherOverlapBAR <- CCDRadarBasicPlot
  CCDAgeGroupRadarAnglingOtherOverlapBAR <-CCDAgeGroupRadarAnglingOtherOverlapBAR %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & Specialist == 1, .N]/ RadarData[Specialist == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Specialist == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Specialist == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Specialist == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[Specialist == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & Specialist == 1, .N]/ RadarData[Specialist == 1,.N] * 100,
                RadarData[CCD_YN == 0 & Specialist == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Specialist == 1,.N] * 100,
                RadarData[CCD_YN == 1 & Specialist == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[Specialist == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[1],
        opacity = 1,
        width = 11,
        offset = OffsetBars[1],
          marker = list(color = fillColorList[1])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & WaterEntry == 1, .N]/ RadarData[WaterEntry == 1,.N] * 100,
                RadarData[CCD_YN == 1 & WaterEntry == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[WaterEntry == 1,.N] * 100,
                RadarData[CCD_YN == 0 & WaterEntry == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[WaterEntry == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & WaterEntry == 1, .N]/ RadarData[WaterEntry == 1,.N] * 100,
                RadarData[CCD_YN == 0 & WaterEntry == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[WaterEntry == 1,.N] * 100,
                RadarData[CCD_YN == 1 & WaterEntry == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[WaterEntry == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[2],
        opacity = 1,
        width = 11,
        offset = OffsetBars[2],
          marker = list(color = fillColorList[2])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & WadersYN == 1, .N]/ RadarData[WadersYN == 1,.N] * 100,
                RadarData[CCD_YN == 1 & WadersYN == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[WadersYN == 1,.N] * 100,
                RadarData[CCD_YN == 0 & WadersYN == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[WadersYN == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & WadersYN == 1, .N]/ RadarData[WadersYN == 1,.N] * 100,
                RadarData[CCD_YN == 0 & WadersYN == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[WadersYN == 1,.N] * 100,
                RadarData[CCD_YN == 1 & WadersYN == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[WadersYN == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[3],
        opacity = 1,
        width = 11,
        offset = OffsetBars[3],
          marker = list(color = fillColorList[3])
      ) %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1 & FishingAbroadYN == 1, .N]/ RadarData[FishingAbroadYN == 1,.N] * 100,
                RadarData[CCD_YN == 1 & FishingAbroadYN == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[FishingAbroadYN == 1,.N] * 100,
                RadarData[CCD_YN == 0 & FishingAbroadYN == 1 & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[FishingAbroadYN == 1,.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 & FishingAbroadYN == 1, .N]/ RadarData[FishingAbroadYN == 1,.N] * 100,
                RadarData[CCD_YN == 0 & FishingAbroadYN == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[FishingAbroadYN == 1,.N] * 100,
                RadarData[CCD_YN == 1 & FishingAbroadYN == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[FishingAbroadYN == 1,.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[4],
        opacity = 1,
        width = 11,
        offset = OffsetBars[4],
          marker = list(color = fillColorList[4])
      )

CCDAgeGroupRadarAnglingOtherOverlapBAR <-CCDAgeGroupRadarAnglingOtherOverlapBAR %>%
  layout(
    barmode = 'group',
    showlegend = TRUE,
    legend = list(bordercolor = 'rgb(40,40,40)', borderwidth = 1,
                  font = list(family = "Arial", size = 12),
                  title = list(text = "Angling Information", family = "Arial", size = 14),
                  x = 0.8, xanchor = "left", 
                  y = 0.5, yanchor = "center"),
    polar = list(
      bgcolor = 'white',
      angularaxis = list(showline = FALSE, showgrid = FALSE, tickmode = 'array', ticks = "", rotation = 90,
      ticktext = c('Know About CCD', "Know About CCD<br>& Perform CCD", "Don't know about CCD<br>and Perform CCD", "Perform CCD",
                       "Don't Know About CCD<br>& Don't Perform CCD", "Know About CCD<br>& Don't Perform CCD"),
      tickvals = c(0,60,120,180,240,300)),
      radialaxis = list(
        visible = TRUE,
        angle = 60, tickangle = 45,
        tickmode = 'array', ticktext = c("", "", "20","", "40","", "60"), tickvals = c(0,10,20,30,40,50,60),
        tickfont = list(size = 10),
        range = c(0,70)
      ))
    )

##############################################################
# Now for all anglers
###############################################################
###########################################################
# Here as a bar polar plot = repeated for angling groups
###########################################################
fillColorList = c("rgb(20,20,20)","rgb(80,80,80)",
                  "rgb(130,130,130)","rgb(190,190,190)")
LegendNames = c("All Anglers")

CCDAgeGroupRadarALLANGLERSOverlapBAR <- CCDRadarBasicPlot
  CCDAgeGroupRadarALLANGLERSOverlapBAR <-CCDAgeGroupRadarALLANGLERSOverlapBAR %>%
      add_trace(
        r = c(RadarData[CCD_YN == 1, .N]/ RadarData[!is.na(CCD_YN),.N] * 100,
                RadarData[CCD_YN == 1  & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[!is.na(CCD_YN) & !is.na(HotWaterYN)& !is.na(DryYN),.N] * 100,
                RadarData[CCD_YN == 0  & HotWaterYN == 1 & DryYN == 1, .N]/ RadarData[!is.na(CCD_YN) & !is.na(HotWaterYN)& !is.na(DryYN),.N] * 100,
                RadarData[HotWaterYN == 1 & DryYN == 1 , .N]/ RadarData[!is.na(CCD_YN) & !is.na(HotWaterYN)& !is.na(DryYN),.N] * 100,
                RadarData[CCD_YN == 0 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[!is.na(CCD_YN) & !is.na(HotWaterYN)& !is.na(DryYN),.N] * 100,
                RadarData[CCD_YN == 1 & (HotWaterYN == 0 | DryYN == 0), .N]/ RadarData[!is.na(CCD_YN) & !is.na(HotWaterYN)& !is.na(DryYN),.N] * 100),
          # theta = c('Know About CCD', "Know About CCD & Do it", "Don't know about CCD but do it", "Perform CCD",
          #             "Don't Know About CCD & Don't do it", "Know About CCD but Don't Do it", 'Know About CCD'),
        theta = c(330,30,90,150,210,270),
        thetaunit = "degree",
        base = 0,
        name = LegendNames[1],
        opacity = 1,
        width = 40,
        offset = 10,
          marker = list(color = fillColorList[1])
      ) 

CCDAgeGroupRadarALLANGLERSOverlapBAR <-CCDAgeGroupRadarALLANGLERSOverlapBAR %>%
  layout(
    barmode = 'group',
    showlegend = FALSE,
    legend = list(bordercolor = 'rgb(40,40,40)', borderwidth = 1,
                  font = list(family = "Arial", size = 12),
                  title = list(text = "All Anglers", family = "Arial", size = 14),
                  x = 0.8, xanchor = "left", 
                  y = 0.5, yanchor = "center"),
    polar = list(
      bgcolor = 'white',
      angularaxis = list(showline = FALSE, showgrid = FALSE, tickmode = 'array', ticks = "", rotation = 90,
      ticktext = c('Know About CCD', "Know About CCD<br>& Perform CCD", "Don't know about CCD<br>and Perform CCD", "Perform CCD",
                       "Don't Know About CCD<br>& Don't Perform CCD", "Know About CCD<br>& Don't Perform CCD"),
      tickvals = c(0,60,120,180,240,300)),
      radialaxis = list(
        visible = TRUE,
        angle = 60, tickangle = 45,
        tickmode = 'array', ticktext = c("", "", "20","", "40","", "60"), tickvals = c(0,10,20,30,40,50,60),
        tickfont = list(size = 10),
        range = c(0,70)
      ))
    )

Using a radar plot the “shape” of the difference between “knowing about CCD” and “performing CCD” can be easily visualised. The area below the horizontal axis represents those anglers that do not perform CCD, and the area to the left of the vertical axis represents anglers that do not know about CCD.

6.1.1 Overlay plot of the age groups Under 18, 35-44 and Over 65

6.1.2 Overlay plot of the angling frequency groups

6.1.3 Overlay plot of the angling types

6.1.4 Overlay plot of other information

6.1.5 Overlay plot of other angling information

6.1.6 Plot of all anglers using the overlay layout


Section 7 - Final BARRIERS broken down by risk

##############################################################################
# In this section the anglers are risk rated and the potential impact assessed
# as per the paper of Smith et al 2020.
##############################################################################
# Here LOW =  Clean&Dry after every trip
#      MINOR = Clean &OR Dried after every 2-5 trips
#      MODERATE = Clean &OR Dried after every 6-10 or 11+ trips
#      MAJOR = DID NOT CLEAN &OR DRY EQUIPMENT
#
# Further clarification based on both clean & dry action - risk is based on the most infrequent action
###############################################################################
# Data from Smith 2020 paper - taken from table 4
SmithRisk_df <- data.table(
  AngRisk = c("Low", "Minor", "Moderate", "Major"),
  `Once a week` = c(46.1, 23.6, 11.8, 18.5),
  `Once a fortnight` = c(44.8, 23.7, 12.0, 19.5),
  `Less than once a fort` = c(50.4, 21.0, 7.6, 21.0)
)

# Taken from table 2
SmithFreq_df <- data.table(
  AngFreq = c("Once a week", "Once a fortnight", "Less than once a fortnight"),
  Per = c(61.2, 17.3, 21.4)
)

# Classify the anglers
# Capture the anglers that have not responded
AnglingData[is.na(CleanFreq) | is.na(DryFreq), RiskClassification := "Unknown"]
# The major group
AnglingData[is.na(RiskClassification) & (CleanYN == FALSE | DryYN == FALSE), RiskClassification := "Major"]
# The LOW group
AnglingData[is.na(RiskClassification) & CleanFreq == "After every trip" & DryFreq == "After every trip", RiskClassification := "Low"]

# The moderate group
AnglingData[is.na(RiskClassification) & ((CleanFreq %in% c("After 6-10 trips", "After 11+ trips")) & (DryFreq %in% c("After every trip", "After 2-5 trips", "After 6-10 trips", "After 11+ trips"))), RiskClassification := "Moderate"]
AnglingData[is.na(RiskClassification) & ((CleanFreq %in% c("After every trip", "After 2-5 trips","After 6-10 trips", "After 11+ trips")) & (DryFreq %in% c("After 6-10 trips", "After 11+ trips"))), RiskClassification := "Moderate"]

# The minor group
AnglingData[is.na(RiskClassification) & (CleanFreq == "After 2-5 trips" & (DryFreq %in% c("After every trip", "After 2-5 trips"))), RiskClassification := "Minor"]
AnglingData[is.na(RiskClassification) & (DryFreq == "After 2-5 trips" & (CleanFreq %in% c("After every trip", "After 2-5 trips"))), RiskClassification := "Minor"]

# Risk against frequency of Angling to compare
RiskVsFreq <- AnglingData[RiskClassification != "Unknown" & !is.na(NewAnglingFreq), .N, keyby = c("NewAnglingFreq", "RiskClassification")]
RiskVsFreq <- rbind(
  RiskVsFreq[NewAnglingFreq < 3, .(NewAnglingFreq, N), by = c( "RiskClassification")],
  RiskVsFreq[NewAnglingFreq > 2, .(NewAnglingFreq = 3,N = sum(N)), by = c( "RiskClassification")]
)
RiskVsFreq[NewAnglingFreq == 1, P := round(N/sum(N) * 100, digits = 2)]
RiskVsFreq[NewAnglingFreq == 2, P := round(N/sum(N) * 100, digits = 2)]
RiskVsFreq[NewAnglingFreq == 3, P := round(N/sum(N) * 100, digits = 2)]

RiskFreqDF <- data.frame(
  'Once a week' = RiskVsFreq[NewAnglingFreq == 1, N],
  'Once a fortnight' = RiskVsFreq[NewAnglingFreq == 2, N],
  'Less than once a fortnight' = RiskVsFreq[NewAnglingFreq == 3, N]
, row.names = c("Low", "Minor", "Moderate", "Major"))

RiskFreqDFP <- data.frame(
  'Once a week' = RiskVsFreq[NewAnglingFreq == 1, P],
  'Once a fortnight' = RiskVsFreq[NewAnglingFreq == 2, P],
  'Less than once a fortnight' = RiskVsFreq[NewAnglingFreq == 3, P]
, row.names = c("Low", "Minor", "Moderate", "Major"))

# Create a table as per Table 4 in the 2020 paper for comparison
RiskVsFreqTable <- kbl(RiskFreqDF, escape = FALSE) %>%
  kable_paper(full_width = FALSE)
RiskVsFreqTable2 <- kbl(RiskFreqDFP, escape = FALSE) %>%
  kable_paper(full_width = FALSE)

############################################
# Compare the surveys
############################################
Comparsion_df <- data.table(
  Risk = SmithRisk_df$AngRisk,
  C_Week = RiskFreqDFP$`Once.a.week`,
  P_Week = SmithRisk_df$`Once a week`,
  Diff_Week = (RiskFreqDFP$`Once.a.week` - SmithRisk_df$`Once a week`),
  C_Fort = RiskFreqDFP$Once.a.fortnight,
  P_Fort = SmithRisk_df$`Once a fortnight`,
  Diff_Fort = (RiskFreqDFP$Once.a.fortnight - SmithRisk_df$`Once a fortnight`),
  C_Plus = RiskFreqDFP$Less.than.once.a.fortnight,
  P_Plus = SmithRisk_df$`Less than once a fort`,
  Diff_Plus = (RiskFreqDFP$Less.than.once.a.fortnight - SmithRisk_df$`Less than once a fort`)
)

RiskVsPrevSurv <- kbl(Comparsion_df, escape = FALSE) %>%
  kable_paper(full_width = FALSE)

# Risk scoring
CmpRiskScore_df <- data.table(
  AngFreq = SmithFreq_df$AngFreq,
  Current = c(
    sum(Comparsion_df[Risk == "Low", C_Week], Comparsion_df[Risk == "Minor", C_Week * 2], Comparsion_df[Risk == "Moderate", C_Week * 3], Comparsion_df[Risk == "Major", C_Week * 4]),
    sum(Comparsion_df[Risk == "Low", C_Fort], Comparsion_df[Risk == "Minor", C_Fort * 2], Comparsion_df[Risk == "Moderate", C_Fort * 3], Comparsion_df[Risk == "Major", C_Fort * 4]),
    sum(Comparsion_df[Risk == "Low", C_Plus], Comparsion_df[Risk == "Minor", C_Plus * 2], Comparsion_df[Risk == "Moderate", C_Plus * 3], Comparsion_df[Risk == "Major", C_Plus * 4])),
    Previous = c(
    sum(Comparsion_df[Risk == "Low", P_Week], Comparsion_df[Risk == "Minor", P_Week * 2], Comparsion_df[Risk == "Moderate", P_Week * 3], Comparsion_df[Risk == "Major", P_Week * 4]),
    sum(Comparsion_df[Risk == "Low", P_Fort], Comparsion_df[Risk == "Minor", P_Fort * 2], Comparsion_df[Risk == "Moderate", P_Fort * 3], Comparsion_df[Risk == "Major", P_Fort * 4]),
    sum(Comparsion_df[Risk == "Low", P_Plus], Comparsion_df[Risk == "Minor", P_Plus * 2], Comparsion_df[Risk == "Moderate", P_Plus * 3], Comparsion_df[Risk == "Major", P_Plus * 4]))
  )

CmpRiskScore_df[, Diff := Current - Previous]
CmpRiskScore_df[, PerChange := round(Diff/Previous * 100, digits = 2)]

CmpRiskScoreTable <- kbl(CmpRiskScore_df, escape = FALSE) %>%
  kable_paper(full_width = FALSE)

ComparsionFreq_df <- data.table(
  AngFreq = SmithFreq_df$AngFreq,
  Current = c(
    round(RiskVsFreq[NewAnglingFreq == 1, sum(N)]/RiskVsFreq[, sum(N)] * 100, digits = 2),
    round(RiskVsFreq[NewAnglingFreq == 2, sum(N)]/RiskVsFreq[, sum(N)] * 100, digits = 2),
    round(RiskVsFreq[NewAnglingFreq == 3, sum(N)]/RiskVsFreq[, sum(N)] * 100, digits = 2)
  ),
  Previous = SmithFreq_df$Per
)
  
CmpAnglFreq <- kbl(ComparsionFreq_df, escape = FALSE) %>%
  kable_paper(full_width = FALSE)

# Correct for difference in freqs - create overall risk score
OverallRiskScore <- data.table(
  Risk = "Total",
  Current = sum(CmpRiskScore_df$Current),
  Previous = sum(CmpRiskScore_df$Previous),
  Corrected = sum(CmpRiskScore_df$Current * ComparsionFreq_df$Previous / 100) * 3
)

OverallRiskScore[, NormalCurrent := Current/Previous]
OverallRiskScore[, NormalPrevious := Previous/Previous]
OverallRiskScore[, NormalCorrected := Corrected/Previous]

CmpOverallRisk <- kbl(OverallRiskScore, escape = FALSE) %>%
  kable_paper(full_width = FALSE)

The anglers risk to biosecurity was classified according to Smith et al. 2020 paper. This risk rates the anglers according to how often they clean and dry their kit. The rating is based on the action they perform the least frequently. The “major” risk grouping assumes an equal importance of cleaning and drying kit to reduce the risk of disease or INNS spread.

There were 982 anglers in the survey that did not indicate the frequency that they cleaned and/or dried their kit. Of these 643 did not indicate if they cleaned and dried their kit and 113 indicated that they did clean and dry their kit.

For those anglers that provided information on how often they cleaned and dried their kit, 1472 anglers (57.77%) were a low risk as they cleaned and dried their kit after every trip.

626 anglers (24.57%) were a minor risk as they cleaned and dried their kit at least every 2-5 trips.

169 anglers (6.63%) were a moderate risk as they cleaned and dried their kit.

281 anglers (11.03%) were a major risk as they did not clean or dry their kit.

5.1 Risk by Angling Frequency

The risk was considered against the frequency of angling.

Once.a.week Once.a.fortnight Less.than.once.a.fortnight
Low 691 576 198
Minor 117 108 54
Moderate 330 248 47
Major 88 65 16
Once.a.week Once.a.fortnight Less.than.once.a.fortnight
Low 56.36 57.77 62.86
Minor 9.54 10.83 17.14
Moderate 26.92 24.87 14.92
Major 7.18 6.52 5.08

5.2 Comparison of Angling Frequency between surveys

Comparing the risk figures to the paper in 2020:

Risk C_Week P_Week Diff_Week C_Fort P_Fort Diff_Fort C_Plus P_Plus Diff_Plus
Low 56.36 46.1 10.26 57.77 44.8 12.97 62.86 50.4 12.46
Minor 9.54 23.6 -14.06 10.83 23.7 -12.87 17.14 21.0 -3.86
Moderate 26.92 11.8 15.12 24.87 12.0 12.87 14.92 7.6 7.32
Major 7.18 18.5 -11.32 6.52 19.5 -12.98 5.08 21.0 -15.92

If we assume a risk of 1 for the Low risk group, 2 for the minor, 3 for moderate and 4 for the Major risk groups we can calculate an at risk score per 100 anglers (percentage) for each of the angling frequency groups.

AngFreq Current Previous Diff PerChange
Once a week 184.92 202.7 -17.78 -8.77
Once a fortnight 180.12 206.2 -26.08 -12.65
Less than once a fortnight 162.22 199.2 -36.98 -18.56

and comparing the frequency of angling:

AngFreq Current Previous
Once a week 48.31 61.2
Once a fortnight 39.28 17.3
Less than once a fortnight 12.41 21.4

Correcting for differences in frequency, the overall risk scores are:

Risk Current Previous Corrected NormalCurrent NormalPrevious NormalCorrected
Total 527.26 608.1 537.1406 0.8670613 1 0.8833097

There was a decrease of 13.29% in the overall risk score, which when corrected for differences in the angling frequency was a decrease of 11.67%